Rebuild cron on boot via disks_mounted event
/etc/cron.d/varaverk is RAM-based and wiped on every reboot. The disks_mounted event fires early in boot (before Docker) with /boot already readable, so schedule.json is available to restore the cron file automatically without any user action.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Rebuild /etc/cron.d/varaverk from schedule.json after every boot.
|
||||
# /etc/cron.d/ is RAM-based and wiped on reboot; schedule.json persists on flash.
|
||||
php -r "
|
||||
require_once '/usr/local/emhttp/plugins/varaverk/include/scheduler.php';
|
||||
\$schedule = vv_schedule_load();
|
||||
if (\$schedule) vv_cron_rebuild(\$schedule);
|
||||
" 2>/dev/null
|
||||
Reference in New Issue
Block a user