diff options
author | Stanislas <stanislas.lange@pm.me> | 2020-06-27 16:45:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-27 16:45:15 +0200 |
commit | 59570c786b9ac96c90c1807e189a2c00ce2326ad (patch) | |
tree | 212609d9f5ba8828964dd5a70a707fa030a5621b | |
parent | 7c6da8df0ebf39f37beae5aa45898c4120d64041 (diff) | |
parent | e04fa5356d9a41a67c050b1c04e6400d004ea272 (diff) |
Merge pull request #85 from randomshell/patch-1
Change check for previously installed wireguard
-rw-r--r-- | wireguard-install.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh index 065de2e..40c08ce 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -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 |