From 7c121d29eb036e29a7c6c94361002a9a2e2bd146 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 14 Apr 2022 19:18:12 +0100 Subject: more on ha.pl --- openbsd/frontends/Rexfile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'openbsd/frontends/Rexfile') diff --git a/openbsd/frontends/Rexfile b/openbsd/frontends/Rexfile index 8f95339..870c34b 100644 --- a/openbsd/frontends/Rexfile +++ b/openbsd/frontends/Rexfile @@ -7,7 +7,6 @@ group dnsslaves => 'twofish.buetow.org'; user 'rex'; sudo TRUE; -sudo_password read_file "$ENV{'HOME'}/.ssh/rex_password"; parallelism 5; @@ -31,20 +30,28 @@ desc 'Setup inetd'; task 'inetd', group => 'frontends', sub { file '/etc/inetd.conf', - source => "./etc/inetd.conf", + source => './etc/inetd.conf', on_change => sub { service 'inetd' => 'restart'; }; + service 'inetd', ensure => 'started'; }; -desc 'Setup failover'; -task 'failover', group => 'frontends', +desc 'Setup HA'; +task 'ha', group => 'frontends', sub { file '/usr/local/bin/ha.pl', - source => "./usr/local/bin/ha.pl", + source => './usr/local/bin/ha.pl', owner => 'root', group => 'wheel', mode => '755'; + + file '/var/run/ha.status', + content => '# Initial HA status file', + owner => 'www', + group => 'wheel', + mode => '644', + no_overwrite => TRUE; }; 1; -- cgit v1.2.3