Skip to content

Commit

Permalink
minor usability improvements
Browse files Browse the repository at this point in the history
* Downgraded messages if removal previously completed to `INFO:`. Not an issue to worry the user with.
* Show `INFO:` after `setup` was successfully completed.
* Show`INFO:` after `remove` was successfully completed.
  • Loading branch information
adrelanos committed Mar 31, 2021
1 parent 1f181df commit cc31902
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions usr/bin/sandbox-app-launcher
Expand Up @@ -142,6 +142,7 @@ setup() {
exit 1
fi
setup_or_check
echo "INFO: Done, setup complete, OK."
}

setup_or_check() {
Expand Down Expand Up @@ -401,14 +402,16 @@ remove_app() {
if getent passwd | grep -q "${app_user}"; then
userdel --remove --force "${app_user}"
else
echo "ERROR: User '${app_user}' does not exist." >&2
echo "INFO: User '${app_user}' does not exist, probably already removed earlier, OK."
fi

if [ -f "${wrapper_script}" ]; then
rm "${wrapper_script}"
else
echo "ERROR: File '${wrapper_script}' does not exist." >&2
echo "INFO: File '${wrapper_script}' does not exist, probably already removed earlier, OK."
fi

echo "INFO: Done, removal complete, OK."
}

if [ "${setup_sandbox}" = "1" ]; then
Expand Down

0 comments on commit cc31902

Please sign in to comment.