From 330a80d83da4bd3b14cce226ca42e4ca8439d8e7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 30 Aug 2022 13:44:41 +0100 Subject: add scripts --- frontends/Rexfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'frontends/Rexfile') diff --git a/frontends/Rexfile b/frontends/Rexfile index 6919918..df68d2c 100644 --- a/frontends/Rexfile +++ b/frontends/Rexfile @@ -113,18 +113,29 @@ desc 'Setup rsync'; task 'rsync', group => 'frontends', sub { pkg 'rsync', ensure => present; + file '/etc/rsyncd.conf', content => template('./etc/rsyncd.conf.tpl'), owner => 'root', group => 'wheel', mode => '644'; + + file '/usr/local/bin/rsync.sh', + content => template('./scripts/rsync.sh.tpl', + is_primary => $is_primary), + owner => 'root', + group => 'wheel', + mode => '755'; + + append_if_no_such_line '/etc/daily.local', '/usr/local/bin/rsync.sh'; }; desc 'Configure the gemtexter sites'; task 'gemtexter', group => 'frontends', sub { file '/usr/local/bin/gemtexter.sh', - content => template('./scripts/gemtexter.sh.tpl'), + content => template('./scripts/gemtexter.sh.tpl', + is_primary => $is_primary), owner => 'root', group => 'wheel', mode => '744'; -- cgit v1.2.3