1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/openvpn/templates/iiab-remote-off
2017-06-12 15:42:32 -07:00

19 lines
382 B
Bash

#!/bin/bash
# script to turn on openvpn
# do nothing if it is not installed
which openvpn
if [ $? -ne 0 ]; then
echo Cannot find the openvpn program.
exit 1
fi
systemctl disable openvpn@xscenet.service
systemctl stop openvpn@xscenet.service
sleep 5
ps -e|grep vpn
if [ $? -eq 0 ]; then
echo Openvpn failed to stop.
else
echo Successfully stopped and disabled Openvpn
fi