It would be nice to add an "After automatic updates" trigger on the /panel/scripts/<id>/actions page, so a script can run right after Ploi's automatic updates have finished (optionally only when packages were actually upgraded).
This would let people add auto-reboots or restart/reload services after updates. Today a script can only run at a fixed time on the clock, which means guessing how long the update run takes, and it's easy to get wrong (for example, script schedules and automatic updates seem to use different timezones, see my other bug report).
It would also help harden Node.js apps hosted with PM2:
- When Node.js is updated through
apt, PM2 keeps running the apps on the old Node.js binary until PM2 or the server is restarted. - This week Node.js had a number of security releases. Just updating Node.js doesn't restart PM2 (it needs for example
pm2 update), so apps stay on the vulnerable version without any warning.
With an "After automatic updates" trigger, a script could run pm2 update (and pm2 resurrect if needed), or reboot the server when /var/run/reboot-required exists.
-
Anoesj Sadraee moved item to project Ploi Core
1 day ago -
Anoesj Sadraee created the item
1 day ago