diff --git a/scripts/app b/scripts/app index c079bdcaf..c40b6a7eb 100755 --- a/scripts/app +++ b/scripts/app @@ -1,21 +1,22 @@ #!/usr/bin/env bash set -euo pipefail +VERSION="0.0.3" + UMBREL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)" USER_FILE="${UMBREL_ROOT}/db/user.json" ACTIVE_APP_REPO_PATH=$($UMBREL_ROOT/scripts/repo path) show_help() { cat << EOF -app 0.0.2 - -CLI for managing Umbrel apps +CLI (v${VERSION}) for managing Umbrel apps Usage: app [] Commands: install Pulls down images for an app and starts it uninstall Removes images and destroys all data for an app + reinstall Calls 'uninstall', followed by 'install' for an app stop Stops an installed app start Starts an installed app restart Restarts an installed app @@ -410,6 +411,16 @@ if [[ "$command" = "stop" ]]; then exit fi +if [[ "$command" = "reinstall" ]]; then + + "${0}" "uninstall" "${app}" + + echo + "${0}" "install" "${app}" + + exit +fi + # Starts an installed app if [[ "$command" = "start" ]]; then diff --git a/scripts/repo b/scripts/repo index 49a99fe4e..e0968ac36 100755 --- a/scripts/repo +++ b/scripts/repo @@ -1,15 +1,15 @@ #!/usr/bin/env bash set -euo pipefail +VERSION="0.0.2" + UMBREL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)" USER_FILE="${UMBREL_ROOT}/db/user.json" DEFAULT_UMBREL_APP_REPO_URL="https://github.com/getumbrel/umbrel-apps.git" show_help() { cat << EOF -repo 0.0.2 - -CLI for managing local Umbrel App Repos +CLI (v${VERSION}) for managing local Umbrel App Repos Usage: repo @@ -213,6 +213,7 @@ fi if [[ "$command" = "default-repo" ]]; then echo "${DEFAULT_UMBREL_APP_REPO_URL}" + exit fi