Hello!
I'm looking for a setting to update Openmediavault automatically, so I don't always have to check if a new version is available.
Is there such a possibility and where ?
Many thanks in advance.
Sincerely R.Lehmeier
Hello!
I'm looking for a setting to update Openmediavault automatically, so I don't always have to check if a new version is available.
Is there such a possibility and where ?
Many thanks in advance.
Sincerely R.Lehmeier
You need to provide a solution on your own. OMV only installs security updates automatically, but everything else is not installed by intention because an update might cause a failure. This decision to install those updates must be on the user side.
Check out this https://wiki.debian.org/UnattendedUpgrades
First thought is a shell script would be needed for this but would be interested to learn more!
I say shell script because automatic updates to linux systems aren't as simple as just "pressing an [update] button" because it might not be something that can or should happen, depending on your setup. No [one]'s system is like [another]'s, thus no [one] update will perform as [another]. Therefore it would be something that should NOT be easily performed by a newb like myself, but also possibly not sanctioned by the amazing devs who contribute to the OS (choose your flavor), they're all amazing in my book!
Now I'll say that there is one thing I'm truly certain of.
Sometimes it's not even a good idea for me to run anything on my machine under my own supervision! Let alone allowing something that alters my system files to run at will.
Display MoreHello!
I'm looking for a setting to update Openmediavault automatically, so I don't always have to check if a new version is available.
Is there such a possibility and where ?
Many thanks in advance.
Sincerely R.Lehmeier
Here's how I do it... It might look complicated but it's pretty simple.
SSH your server and become root and cd to your root directory
Make a directory called "scripts" and then cd into said directory
Open a blank file called omv-upgrade.sh in nano
You'll get a blank screen, copy/paste the below into it
Save it with Cntrl + X, then Y, then Enter. And you'll be back at the prompt
Now make the file executable
Now, test the script (when you run the command below, you should see your system update)
Once you've confirmed it works, it's just a matter of scheduling it.
Go to the OMV webui under Systems/Scheduled tasks, click the + sign to create a new task.
Now, you may want to Google how to use cron scheduling, otherwise you may accidentally have this job running every 10sec and not even know it... but here's an example of a job that runs every Saturday morning at 0300.
Once you set your times, etc.
Set your user to "root"
Then set your command as sh and the path to your script ie, sh /scripts/omv-upgrade.sh
Save the job and apply the changes
Once back at the list of scheduled tasks, click the job and click the "play" button at the top to give it a test run. Note when you manually run it you'll have to click "Start" to run the job, and you'll see in the window it updating your system. When it's scheduled, it will just run.
That's it. Only thing I've not perfected is applying any changes to the webuI after an update. I've tried a couple different methods and they didn't work properly. So usualy later Saturday or Sunday morning, I log in to the webuI and apply any changes that need to be made.
It sounds complicated, but honestly it's ridiculously simple.
Lol. You know you're right. When I done this a long time ago, I was scripting several things and that was one of them on the list. Didn't even dawn on me to just run it directly.
Now I feel like a fool.. 😃
I have now implemented it. and it remains to be seen whether I have done everything right.
Thanks for the help.
I use this command in the scheduled task to also apply pending changes automatically:
omv-upgrade && omv-rpc -u admin "config" "applyChanges" "{ \"modules\": $(cat /var/lib/openmediavault/dirtymodules.json),\"force\": true }" 2>/dev/null
found the second command here:
Apply "Pending configuration changes" on the command line
Applying changes when there are none, thats why I ignore errors, not ideal but does the job.
Works well in OMV 7.
Aren't the modules automatically updated during an omv-upgrade?
I have run omv-upgrade && omv-rpc -u admin “config” “applyChanges” “{ \”modules\“: $(cat /var/lib/openmediavault/dirtymodules.json),\”force\“: true }” 2>/dev/null as a test and only get a 'Connection lost' and the output:
Geplante Aufgabe ausführen
Get:1 file:/var/cache/openmediavault/archives InRelease
Ign:1 file:/var/cache/openmediavault/archives InRelease
Get:2 file:/var/cache/openmediavault/archives Release
Ign:2 file:/var/cache/openmediavault/archives Release
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:5 file:/var/cache/openmediavault/archives Translation-de_DE
Ign:5 file:/var/cache/openmediavault/archives Translation-de_DE
Get:6 file:/var/cache/openmediavault/archives Translation-de
Ign:6 file:/var/cache/openmediavault/archives Translation-de
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:5 file:/var/cache/openmediavault/archives Translation-de_DE
Ign:5 file:/var/cache/openmediavault/archives Translation-de_DE
Get:6 file:/var/cache/openmediavault/archives Translation-de
Ign:6 file:/var/cache/openmediavault/archives Translation-de
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:5 file:/var/cache/openmediavault/archives Translation-de_DE
Ign:5 file:/var/cache/openmediavault/archives Translation-de_DE
Get:6 file:/var/cache/openmediavault/archives Translation-de
Ign:6 file:/var/cache/openmediavault/archives Translation-de
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:5 file:/var/cache/openmediavault/archives Translation-de_DE
Ign:5 file:/var/cache/openmediavault/archives Translation-de_DE
Get:6 file:/var/cache/openmediavault/archives Translation-de
Ign:6 file:/var/cache/openmediavault/archives Translation-de
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:5 file:/var/cache/openmediavault/archives Translation-de_DE
Ign:5 file:/var/cache/openmediavault/archives Translation-de_DE
Get:6 file:/var/cache/openmediavault/archives Translation-de
Ign:6 file:/var/cache/openmediavault/archives Translation-de
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:5 file:/var/cache/openmediavault/archives Translation-de_DE
Ign:5 file:/var/cache/openmediavault/archives Translation-de_DE
Get:6 file:/var/cache/openmediavault/archives Translation-de
Ign:6 file:/var/cache/openmediavault/archives Translation-de
Get:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:5 file:/var/cache/openmediavault/archives Translation-de_DE
Ign:5 file:/var/cache/openmediavault/archives Translation-de_DE
Get:6 file:/var/cache/openmediavault/archives Translation-de
Ign:6 file:/var/cache/openmediavault/archives Translation-de
Get:7 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Hit:8 http://packages.openmediavault.org/public sandworm InRelease
Hit:9 http://deb.debian.org/debian bookworm InRelease
Hit:10 http://deb.debian.org/debian bookworm-updates InRelease
Hit:11 http://httpredir.debian.org/debian bookworm-backports InRelease
Hit:12 https://openmediavault-plugin-developers.github.io/packages/debian sandworm InRelease
Hit:13 https://openmediavault.github.io/packages sandworm InRelease
Fetched 48.0 kB in 2s (21.3 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
** CONNECTION LOST **
Display More
Don’t have an account yet? Register yourself now and be a part of our community!