Skip to content

Commit

Permalink
Remove safe_run() from maintenance.sh because we are now using system…
Browse files Browse the repository at this point in the history
…d services
  • Loading branch information
Salamandar committed Nov 13, 2024
1 parent 68754be commit 3958765
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions maintenance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ update_app_levels() {
venv/bin/python3 update_app_levels/update_app_levels.py -r "[email protected]:YunoHost/apps.git" -c .apps_cache
}

safe_run() {
logfile="$SCRIPT_DIR/$1.log"
error_msg_var="${1}_error_msg"
if ! "$@" &>> "$logfile"; then
sendxmpppy "${!error_msg_var}"
fi
}

main() {
cd "$SCRIPT_DIR"

Expand All @@ -87,7 +79,10 @@ main() {
APPS_TOOLS_UPDATED=1 exec "$0" "$@"
fi

safe_run "$@"
if ! "$@"; then
error_msg_var="${1}_error_msg"
sendxmpppy "${!error_msg_var}"
fi
}

main "$@"

0 comments on commit 3958765

Please sign in to comment.