[PATCH] wg-quick: use SUDO variable for a different sudo implementation like doas
fossdd
fossdd at pwned.life
Mon Dec 23 11:04:55 UTC 2024
Signed-off-by: fossdd <fossdd at pwned.life>
---
src/wg-quick/linux.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wg-quick/linux.bash b/src/wg-quick/linux.bash
index 4193ce5..7795c0b 100755
--- a/src/wg-quick/linux.bash
+++ b/src/wg-quick/linux.bash
@@ -82,7 +82,7 @@ read_bool() {
}
auto_su() {
- [[ $UID == 0 ]] || exec sudo -p "$PROGRAM must be run as root. Please enter the password for %u to continue: " -- "$BASH" -- "$SELF" "${ARGS[@]}"
+ [[ $UID == 0 ]] || exec "${SUDO:-sudo}" "$BASH" -- "$SELF" "${ARGS[@]}"
}
add_if() {
base-commit: 13f4ac4cb74b5a833fa7f825ba785b1e5774e84f
--
2.47.1
More information about the WireGuard
mailing list