Add alternative Cloudflare DoH script

This commit is contained in:
Pothi Kalimuthu 2025-06-02 06:47:02 +05:30
parent 4d444a66bd
commit 60e720b7a5
No known key found for this signature in database
GPG key ID: 57069303D36E3093
4 changed files with 54 additions and 1 deletions

View file

@ -33,7 +33,7 @@
/system script
:local commonScripts {"backup-buttons"; "backup-cron"; "backup-scripts"; "cloud-backup"; "firmware-check"}
:local commonScripts {"cloud-backup"; "firmware-check"}
:local initScripts ("wifi-enable", $commonScripts)
:foreach scriptName in $initScripts do={
@ -41,4 +41,16 @@
:delay 30s
}
:local currentHour [:tonum [:pick [/system clock get time] 0 2]]
:if ($currentHour < 12) do={
:local backupScripts {"backup-cron"; "backup-scripts"}
:foreach scriptName in $backupScripts do={
:do { run $scriptName } on-error={:log error "Error running $scriptName"}
:delay 30s
}
} else={
:log info "Automated backups aren't taken after 12 noon."
}
:log info "Init script ended."