diff --git a/build_scripts/appimage/install-infection-monkey-service.sh b/build_scripts/appimage/install-infection-monkey-service.sh index 272d6eb44..596dad010 100755 --- a/build_scripts/appimage/install-infection-monkey-service.sh +++ b/build_scripts/appimage/install-infection-monkey-service.sh @@ -83,16 +83,16 @@ uninstall_service() { echo "The Infection Monkey service has been uninstalled" } -user_exists() { - id -u "$1" &>/dev/null -} - exit_if_user_doesnt_exist() { if ! user_exists "$1" ; then die "Error: User '$1' does not exist." fi } +user_exists() { + id -u "$1" &>/dev/null +} + has_sudo() { # 0 true, 1 false sudo -nv > /dev/null 2>&1