From ed58ca6950abc6b15e5725ca561ea6799a8a6b0e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 5 May 2022 09:21:19 -0400 Subject: [PATCH] Build: Rename $uname -> $username in AppImage installation script "uname" could refer to the `uname` command (short for unix name). "username" more clearly communicates the variable's purpose. --- .../appimage/install-infection-monkey-service.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build_scripts/appimage/install-infection-monkey-service.sh b/build_scripts/appimage/install-infection-monkey-service.sh index 58f832a2d..2ecf6729d 100755 --- a/build_scripts/appimage/install-infection-monkey-service.sh +++ b/build_scripts/appimage/install-infection-monkey-service.sh @@ -99,13 +99,13 @@ exit_if_missing_argument() { } do_uninstall=false -uname="" +username="" while (( "$#" )); do case "$1" in --user) exit_if_missing_argument "$1" "$2" - uname=$2 + username=$2 shift 2 ;; --install) @@ -142,11 +142,11 @@ if $do_uninstall ; then exit 0 fi -assert_parameter_supplied "--user" "$uname" +assert_parameter_supplied "--user" "$username" -if ! user_exists "$uname" ; then - echo "Error: User '$uname' does not exist" +if ! user_exists "$username" ; then + echo "Error: User '$username' does not exist" exit 1 fi -install_service "$uname" +install_service "$username"