mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-11-28 15:56:36 +00:00
Merge pull request #85 from randomshell/patch-1
Change check for previously installed wireguard
This commit is contained in:
commit
59570c786b
@ -82,14 +82,14 @@ if [ "$(systemd-detect-virt)" == "lxc" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "add-client" ]]; then
|
if [[ $1 == "add-client" ]]; then
|
||||||
if [[ -e /etc/wireguard ]]; then
|
if [[ -e /etc/wireguard/params ]]; then
|
||||||
addClient
|
addClient
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Please install WireGuard first."
|
echo "Please install and configure WireGuard first."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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."
|
echo "WireGuard is already installed. Run with 'add-client' to add a client."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user