ronivay / XenOrchestraInstallerUpdater

Xen Orchestra install/update script
GNU General Public License v3.0
1.16k stars 189 forks source link

Autoupdate #101

Closed SanderBlom closed 2 years ago

SanderBlom commented 2 years ago

Hello!

I'm just wondering if it's possible to make the script run on weekly or monthly basis to update the install? Is this maybe possible to do with cron?

dsiminiuk commented 2 years ago

Sure you can.

Add a record to crontab (2am SUNDAY here)

0  2    * * 0   root    /root/xo_update.sh

Create the script using whatever name you use.

#!/usr/bin/bash
cd XenOrchestraInstallerUpdater
./xo-install.sh --update

You'll get some output you'll have to deal with, but it works.

ronivay commented 2 years ago

Hi,

Yup, cron and --update is the way to go. That option in script won't prompt for anything so it's fine to be ran non-interactively.

psychogun commented 2 years ago

Sure you can.

Add a record to crontab (2am daily here)

0  2    * * 0   root    /root/xo_update.sh

Create the script using whatever name you use.

#!/usr/bin/bash
cd XenOrchestraInstallerUpdater
./xo-install.sh --update

You'll get some output you'll have to deal with, but it works.

2am every Sunday ;) And should it not be cd /opt/XenOrchestraInstallerUpdater, with/opt.

Anyways, thanks! I had the same question and this helped.

dsiminiuk commented 2 years ago

Yes, every Sunday.

As my crontab example shows, my update script is in /root. I never wrote /opt, so I'm not sure what your getting at.

Glad it helped at least.