mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
22 lines
498 B
Bash
22 lines
498 B
Bash
#!/bin/bash
|
|
|
|
# /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
|
|
if [ $? -ne 0 ]; then
|
|
echo 'Cannot find the OpenVPN program (openvpn).'
|
|
exit 1
|
|
fi
|
|
|
|
systemctl disable openvpn
|
|
systemctl stop openvpn
|
|
|
|
sleep 5
|
|
ps -e | grep vpn
|
|
if [ $? -eq 0 ]; then
|
|
echo OpenVPN failed to stop.
|
|
else
|
|
echo Successfully stopped and disabled OpenVPN.
|
|
fi
|