1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00
* change apache_data to apache_user in all

* no libapach2 in centos. just php. no php-magick in centos

* remove redundant vars entries

* do not create apache user

* missed one pound sign

* soft code all references to apache_user

* centos requires older setuptools

* revert ansible_lsb.id in xsce.yml

* try getting recent pip

* move pip download to 2prep so that kalite success is not dependent on iiab coming first

* still need to replace setuptools in kalite

* add curl -- needed in debian

* massivly substitue iiab for xsce, and rename files

* completed runansible

* centos fixes,install  pip

* appliance means no iptables rules

* change to earlier version of setuptools for centos

* delete file duplicate, hopefully unnecessary. generate the offline docs

* wiki docs errors

* create the admin group -- deleted earlier

* use the --yes option with pip uninstall

* base of repo moved from schoolserver to iiab, unleashkids.org->iiab.io

* network detection broken due to tupo
This commit is contained in:
georgejhunt 2017-06-09 16:25:56 -07:00 committed by GitHub
parent 6ef68cc480
commit f319afa432
179 changed files with 978 additions and 672 deletions

View file

@ -13,7 +13,7 @@ if [ "$2" = "up" ]; then
sleep 2
/sbin/ip route list dev "$1" | grep -q '^default' &&
# restart the services
systemctl -q is-enabled openvpn@xscenet.service && /usr/lib/xsce/up-wan
systemctl -q is-enabled openvpn@iiabnet.service && /usr/lib/iiab/up-wan
fi
# we added this to prevent logs from filling with openvpn errors
@ -22,7 +22,7 @@ fi
# sleep 2
# /sbin/ip route list dev "$1" | grep -q '^default' ||
# stop the services
# systemctl -q is-enabled openvpn@xscenet.service && systemctl stop openvpn@xscenet.service
# systemctl -q is-enabled openvpn@iiabnet.service && systemctl stop openvpn@iiabnet.service
#fi
exit 0

View file

@ -3,18 +3,18 @@
HANDLE=
UUID=
source /etc/xsce/xsce.env
source /etc/iiab/iiab.env
if [ -z "$HANDLE" ]; then
HANDLE=`cat /etc/xsce/xsce.ini | gawk \
HANDLE=`cat /etc/iiab/iiab.ini | gawk \
'{ if((toupper($1) == "HANDLE") && ($2 == "=")) { print $3;}}'`
fi
if [ -z "$HANDLE" ]; then
if [ -f /etc/xsce/handle ]; then
HANDLE=`cat /etc/xsce/handle`
if [ -f /etc/iiab/handle ]; then
HANDLE=`cat /etc/iiab/handle`
fi
fi
if [ -f /etc/xsce/uuid ]; then
UUID=`cat /etc/xsce/uuid`
if [ -f /etc/iiab/uuid ]; then
UUID=`cat /etc/iiab/uuid`
fi
# start the daemon which will serve the handle on demand
source /etc/init.d/functions

View file

@ -0,0 +1,6 @@
# this file allows changing the world accessable vpn server and its ip address
#
# copy this template file to /etc/openvpn/iiab-vpn.conf, and set properly
# VPNCONFIG=< put the name of the config file in /etc/openvpn you want to use>
# VPNIP=<put the ip address of server, pinged to test for existence of vpn tunnel>

View file

@ -0,0 +1,37 @@
#########################################
# Sample client-side OpenVPN config file
# for connecting to multi-client server.
#
# Adapted from http://openvpn.sourceforge.net/20notes.html
#
# The server can be pinged at {{ openvpn_server_virtual_ip }}
#
port {{ openvpn_server_port }}
dev tun
remote iiabnet.net
# TLS parms
tls-client
ca keys/ca.crt
cert keys/client1.crt
key keys/client1.key
# This parm is required for connecting
# to a multi-client server. It tells
# the client to accept options which
# the server pushes to us.
pull
# Scripts can be used to do various
# things (change nameservers, for
# example.
script-security 2
up scripts/announce
down scripts/silence
log /var/log/openvpn.log
verb 3
comp-lzo yes
keepalive 5 30

View file

@ -22,6 +22,6 @@ if [ "$enabled" = 'True' ]; then
killall openvpn
sleep 10
#echo "Starting openvpn and waiting 10 seconds for daemon to become ready"
systemctl start openvpn@xscenet
systemctl start openvpn@iiabnet
fi
fi

View file

@ -4,6 +4,6 @@ systemctl is-enabled openvpn
if [ $? -eq 0 ]; then
pgrep openvpn
if [ $? -ne 0 ]; then
systemctl start openvpn@xscenet
systemctl start openvpn@iiabnet
fi
fi

View file

@ -4,10 +4,10 @@ echo
echo
read -p "what identifying handle would you like to use? " ans
if [ "$ans" == "" ]; then
if [ -f /etc/xsce/handle ]; then
rm -f /etc/xsce/handle
if [ -f /etc/iiab/handle ]; then
rm -f /etc/iiab/handle
fi
else
echo $ans > /etc/xsce/handle
echo $ans > /etc/iiab/handle
fi
{{ systemctl_program }} restart openvpn@xscenet
{{ systemctl_program }} restart openvpn@iiabnet

View file

@ -1,11 +1,11 @@
#!/bin/sh
# script to manage openvpn
if [ ! -f "/etc/openvpn/xsce-vpn.conf" ]; then
if [ ! -f "/etc/openvpn/iiab-vpn.conf" ]; then
VPNCONFIG='party-line.conf'
VPNIP={{ openvpn_server_virtual_ip }}
else
# expect the sourced file to set the above variables
source /etc/openvpn/xsce-vpn.conf
source /etc/openvpn/iiab-vpn.conf
fi
# we'd like the user of this script to have root privilege