Closed xopez closed 5 years ago
If you really want to do this you could crontab a script like:
#!/bin/bash
MCDIR=/your/mailcow/dir
cd $MCDIR
yes | ./update.sh >>$MCDIR/update.log
exit 0
This should run the script auto answeing yes to the prompts and log the result to a file so you can review if something goes wrong.
However you should not run it too often as it brings down the services for a good minute at least.
Yes, indeed, it is dangerous. It is better to always watch the update process.
Thanks for the little script. Maybe I just let the cronjob out and do this manually once a month.
Yes, you might miss for exemple some merge conflits problems you have to resolve manually if you customized some config stuff if you modded some files
I just use the default stuff. Closing this for now.
If you really want to do this you could crontab a script like:
#!/bin/bash MCDIR=/your/mailcow/dir cd $MCDIR yes | ./update.sh >>$MCDIR/update.log exit 0
This should run the script auto answeing yes to the prompts and log the result to a file so you can review if something goes wrong.
However you should not run it too often as it brings down the services for a good minute at least.
Modified script so that it will not execute the update script if there are no updates. The script can now be run daily without a service restart.
#!/bin/bash
MCDIR=/opt/mailcow-dockerized
cd $MCDIR
checkServer=$(./update.sh --check)
echo $checkServer
if [[ $checkServer =~ "No updates available" ]]; then
echo "no update"
else
echo "update"
yes | ./update.sh >>$MCDIR/update.log
fi
exit 0
Is your feature request related to a problem? Please describe. I don't think cause I didn't find anything.
Describe the solution you'd like I only know the way of updating with ´./update.sh´. I want to automate the process. Since you must accept the stop of the containers, you can't really automate it. I want simply to ad a cronjob with a script, where I change the directory and start the update-file. If there is already such a feature ignore this request.