ansible-docker-mailcow/roles/mailcow-ansiblerole/templates/updater.sh.j2
Jesko Anschütz d563801458 initial
2025-03-20 10:39:09 +01:00

21 lines
460 B
Django/Jinja

#!/usr/bin/env bash
# Update Mailcow
# Author: ntimo
cd {{ mailcow__install_path }} || exit
echo "Updating updater before runnning update"
git fetch origin master
git checkout origin/master update.sh
if ./update.sh -c | grep -q 'Updated code is available'; then
echo "Upgrading Mailcow"
echo "Installing updates"
printf "%s\n" "y" "y" | ./update.sh
echo "Collecting Gargabe"
echo 'y' | ./update.sh --gc
else
echo "No updates are available"
fi