2016-03-18 17:59:50 +01:00
|
|
|
#!/bin/sh
|
2017-02-23 17:28:23 +01:00
|
|
|
PROFILE=$(hostname)
|
2016-09-04 03:29:23 +02:00
|
|
|
|
2017-02-10 18:41:08 +01:00
|
|
|
sudo systemctl stop openvpn-client@$PROFILE.service
|
2016-03-18 17:59:50 +01:00
|
|
|
|
2017-02-23 17:24:06 +01:00
|
|
|
if [[ $1 = "on" ]]
|
2016-09-04 03:29:23 +02:00
|
|
|
then
|
2017-02-10 18:41:08 +01:00
|
|
|
sudo systemctl start openvpn-client@$PROFILE.service
|
|
|
|
echo "$PROFILE started"
|
2016-09-04 03:29:23 +02:00
|
|
|
else
|
2017-02-23 17:24:06 +01:00
|
|
|
echo "All stopped."
|
2016-09-04 03:29:23 +02:00
|
|
|
fi
|