From 7042ffbd6304dfc5af60609cc18b0aedd8ca4a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 9 Sep 2024 17:24:10 +0200 Subject: [PATCH] Better scripting, and exit on git pull --- maintenance.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maintenance.sh b/maintenance.sh index b263dcf..8e199c1 100644 --- a/maintenance.sh +++ b/maintenance.sh @@ -12,7 +12,10 @@ function update_venv() function git_pull_and_update_cron_and_restart_services_if_needed() { - git pull &>/dev/null || sendxmpppy "[apps repo] Couldn't pull, maybe local changes are present?" + if ! git pull &>/dev/null; then + sendxmpppy "[apps repo] Couldn't pull, maybe local changes are present?" + exit 1 + fi # Cron cat cron | sed "s@__BASEDIR__@$workdir@g" > /etc/cron.d/app_list