Skip to content

Commit

Permalink
Install wg-quick to /usr/local/sbin if run as root.
Browse files Browse the repository at this point in the history
  • Loading branch information
burghardt committed Sep 2, 2024
1 parent e32fc87 commit ed30d4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion easy-wg-quick
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions tests/arguments.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ed30d4b

Please sign in to comment.