Merge pull request #85 from randomshell/patch-1

Change check for previously installed wireguard
This commit is contained in:
Stanislas 2020-06-27 16:45:15 +02:00 committed by GitHub
commit 59570c786b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -82,14 +82,14 @@ if [ "$(systemd-detect-virt)" == "lxc" ]; then
fi
if [[ $1 == "add-client" ]]; then
if [[ -e /etc/wireguard ]]; then
if [[ -e /etc/wireguard/params ]]; then
addClient
exit 0
else
echo "Please install WireGuard first."
echo "Please install and configure WireGuard first."
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."
exit 1
fi