From 74af3b5f2fc622c583e08f10e1d062969d95288d Mon Sep 17 00:00:00 2001 From: fossdd Date: Fri, 20 Dec 2024 08:29:26 +0100 Subject: [PATCH] Use SUDO variable for a different sudo implementation like doas Signed-off-by: fossdd --- 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 e4d4c4f..f9b1da7 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() { -- 2.47.1