1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-10-31 18:52:31 +00:00

Check wireguard status with /etc/wireguard/params

This commit is contained in:
Navratan Gupta 2020-07-01 13:42:04 +05:30
parent b323ff0b5a
commit c024742b5d

View File

@ -174,14 +174,14 @@ if [[ $1 == "add-client" ]]; then
exit 1
fi
elif [[ $1 == "uninstall" ]]; then
if [[ -e /etc/wireguard ]]; then
if [[ -e /etc/wireguard/params ]]; then
uninstall
exit 0
else
echo "WireGuard is not installed."
exit 1
fi
elif [[ -e /etc/wireguard ]]; then
elif [[ -e /etc/wireguard/params ]]; then
echo "WireGuard is already installed. Run with 'add-client' to add a client or 'uninstall' to remove."
exit 1
fi