No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
25 additions and
1 deletions
-
scripts/app
-
scripts/update/01-run.sh
|
|
@ -18,6 +18,7 @@ Commands: |
|
|
|
stop Stops an installed app |
|
|
|
start Starts an installed app |
|
|
|
compose Passes all arguments to docker-compose |
|
|
|
ls-installed Lists installed apps |
|
|
|
EOF |
|
|
|
} |
|
|
|
|
|
|
@ -31,7 +32,7 @@ check_dependencies () { |
|
|
|
} |
|
|
|
|
|
|
|
list_installed_apps() { |
|
|
|
cat "${USER_FILE}" | jq -r 'if has("installedApps") then .installedApps else [] end | join("\n")' || true |
|
|
|
cat "${USER_FILE}" 2> /dev/null | jq -r 'if has("installedApps") then .installedApps else [] end | join("\n")' || true |
|
|
|
} |
|
|
|
|
|
|
|
# Check dependencies |
|
|
@ -43,6 +44,13 @@ else |
|
|
|
command="$1" |
|
|
|
fi |
|
|
|
|
|
|
|
# Lists installed apps |
|
|
|
if [[ "$command" = "ls-installed" ]]; then |
|
|
|
list_installed_apps |
|
|
|
|
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -z ${2+x} ]; then |
|
|
|
show_help |
|
|
|
exit 1 |
|
|
|
|
|
@ -81,6 +81,22 @@ cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|
|
|
EOF |
|
|
|
docker-compose pull |
|
|
|
|
|
|
|
echo "Updating installed apps" |
|
|
|
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|
|
|
{"state": "installing", "progress": 60, "description": "Updating installed apps", "updateTo": "$RELEASE"} |
|
|
|
EOF |
|
|
|
# We can just loop over this once everyone has the latest app script |
|
|
|
# "$UMBREL_ROOT/scripts/app" ls-installed |
|
|
|
# but for now we need to implement it here manually |
|
|
|
USER_FILE="${UMBREL_ROOT}/db/user.json" |
|
|
|
list_installed_apps() { |
|
|
|
cat "${USER_FILE}" 2> /dev/null | jq -r 'if has("installedApps") then .installedApps else [] end | join("\n")' || true |
|
|
|
} |
|
|
|
list_installed_apps | while read app; do |
|
|
|
echo "${app}..." |
|
|
|
scripts/app compose "${app}" pull |
|
|
|
done |
|
|
|
|
|
|
|
# Stop existing containers |
|
|
|
echo "Stopping existing containers" |
|
|
|
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|
|
|