mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
longstanding syntax error (bash wouldn't run this on Ubuntu 18.04)
This commit is contained in:
parent
6e18a5af15
commit
96d1eae568
1 changed files with 7 additions and 4 deletions
|
@ -1,17 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# script to turn on openvpn
|
|
||||||
|
|
||||||
# do nothing if it is not installed
|
# /usr/bin/iiab-remote-off is intended to fully turn off multiple remote
|
||||||
|
# support services like OpenVPN and others, to reduce risk of remote attacks.
|
||||||
|
|
||||||
|
# Do nothing if OpenVPN not installed
|
||||||
which openvpn
|
which openvpn
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo Cannot find the OpenVPN program (openvpn).
|
echo 'Cannot find the OpenVPN program (openvpn).'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl disable openvpn
|
systemctl disable openvpn
|
||||||
systemctl stop openvpn
|
systemctl stop openvpn
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
ps -e|grep vpn
|
ps -e | grep vpn
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo OpenVPN failed to stop.
|
echo OpenVPN failed to stop.
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue