Skip to content

Commit

Permalink
Better scripting, and exit on git pull
Browse files Browse the repository at this point in the history
  • Loading branch information
Félix Piédallu authored and Salamandar committed Sep 9, 2024
1 parent 1e7cbf9 commit 47c9f08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maintenance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47c9f08

Please sign in to comment.