1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/roles/openvpn/templates/15-openvpn
georgejhunt f319afa432 Test (#20)
* 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
2017-06-09 16:25:56 -07:00

28 lines
930 B
Bash
Executable file

#!/bin/bash
export LC_ALL=C
#INTERFACE=$1 # The interface which is brought up or down
#STATUS=$2 # The new state of the interface
# whenever interface is brought up by NM (rhbz #565921)
if [ "$2" = "up" ]; then
# wait a few seconds to allow interface startup to complete
# (important at boot time without this the service still fails
# time-out for dispatcher script is 3s (rhbz#1003695#8)
sleep 2
/sbin/ip route list dev "$1" | grep -q '^default' &&
# restart the services
systemctl -q is-enabled openvpn@iiabnet.service && /usr/lib/iiab/up-wan
fi
# we added this to prevent logs from filling with openvpn errors
# but we do not expect openvpn to be on in that case
#if [ "$2" = "down" ]; then
# sleep 2
# /sbin/ip route list dev "$1" | grep -q '^default' ||
# stop the services
# systemctl -q is-enabled openvpn@iiabnet.service && systemctl stop openvpn@iiabnet.service
#fi
exit 0