diff options
| author | Paul Buetow <paul@buetow.org> | 2023-04-21 20:09:13 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-04-21 20:09:13 +0300 |
| commit | 72d248eba6f0e8a2e300f0ba9f70ba10d0f0c9c8 (patch) | |
| tree | 180c117256d6c90cf6f36f8d7425fa111e580be2 /frontends/Rexfile | |
| parent | 155420490e74ee430993e1bb43383a462e4b8354 (diff) | |
add cron template
Diffstat (limited to 'frontends/Rexfile')
| -rw-r--r-- | frontends/Rexfile | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile index dbc37d8..d887e6a 100644 --- a/frontends/Rexfile +++ b/frontends/Rexfile @@ -8,7 +8,7 @@ # Rex is programmed in Perl and there is already Perl in the base system of OpenBSD. # Also, I find Perl > Python (my personal opinion). -use Rex -feature => ['1.13']; +use Rex -feature => ['1.14']; use Rex::Logger; use File::Slurp; @@ -425,8 +425,9 @@ task 'gogios', group => 'frontends', file '/tmp/gogios.cron', ensure => 'file', - content => "*/5 8-22 * * * $gogios_path >/dev/null\n0 7 * * * $gogios_path -renotify >/dev/null\n", - mode => '755'; + content => template('./etc/gogios.cron.tpl', + gogios_path => $fqdns), + mode => '600'; run 'cat /tmp/gogios.cron | crontab -u _gogios -'; run 'rm /tmp/gogios.cron'; |
