From ed30d4b0f1e28a67ecddad3fb52bf4da16d2b4d9 Mon Sep 17 00:00:00 2001 From: Krzysztof Burghardt Date: Mon, 2 Sep 2024 10:24:33 +0200 Subject: [PATCH] Install wg-quick to /usr/local/sbin if run as root. --- easy-wg-quick | 2 +- tests/arguments.bats | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/easy-wg-quick b/easy-wg-quick index 238b4f1..e9f3d4e 100755 --- a/easy-wg-quick +++ b/easy-wg-quick @@ -677,7 +677,7 @@ download_and_install_wg_quick() { } if test "$(id -u)" -eq 0; then - DESTDIR="/usr/local/bin" + DESTDIR="/usr/local/sbin" else DESTDIR="${HOME}/.local/bin" mkdir -p "$DESTDIR" diff --git a/tests/arguments.bats b/tests/arguments.bats index 455ac4a..ee9a477 100755 --- a/tests/arguments.bats +++ b/tests/arguments.bats @@ -77,7 +77,7 @@ load teardown setup [[ "${#lines[@]}" -ge 0 ]] if [[ "$(id -u)" -eq 0 ]]; then - [[ -x /usr/local/bin/wg-quick ]] + [[ -x /usr/local/sbin/wg-quick ]] else [[ -x "${HOME}/.local/bin/wg-quick" ]] fi @@ -89,7 +89,7 @@ load teardown setup [[ "${#lines[@]}" -ge 0 ]] if [[ "$(id -u)" -eq 0 ]]; then - [[ -x /usr/local/bin/wg-quick ]] + [[ -x /usr/local/sbin/wg-quick ]] else [[ -x "${HOME}/.local/bin/wg-quick" ]] fi