summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-02-05 11:52:47 +0200
committerPaul Buetow <paul@buetow.org>2023-02-05 11:52:47 +0200
commit68815cbb9d52ecfb3da5b89d57808ba4806c0498 (patch)
tree95b486e91b76ae5869baa2589b9e48e2a7b8bf71
parent4c98b2cde80aebbadbabb4f0339c8a179b66d4fb (diff)
preparing IRC bouncer
-rw-r--r--frontends/Rexfile23
-rw-r--r--frontends/var/nsd/zones/master/buetow.org.zone.tpl2
2 files changed, 18 insertions, 7 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile
index 512ff48..4883283 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.4'];
+use Rex -feature => ['1.13'];
use Rex::Logger;
use File::Slurp;
@@ -17,6 +17,8 @@ use File::Slurp;
group frontends => 'blowfish.buetow.org', 'fishfinger.buetow.org';
group dnsmaster => 'blowfish.buetow.org';
group dnsslaves => 'fishfinger.buetow.org';
+our $ircbouncer_server = 'fishfinger.buetow.org';
+group ircbouncer => $ircbouncer_server;
user 'rex';
sudo TRUE;
@@ -73,11 +75,15 @@ our $filewalk = sub {
return @files;
};
+sub hostname {
+ run 'hostname';
+}
+
# The secret store. Note to myself: "geheim cat rexfilesecrets.txt"
our $secrets = sub { read_file './secrets/' . shift };
our @dns_zones = qw/buetow.org dtail.dev foo.surf foo.zone irregular.ninja sidewalk.ninja snonux.de snonux.me snonux.land/;
-our @acme_hosts = qw/buetow.org paul.buetow.org tmp.buetow.org dory.buetow.org footos.buetow.org dtail.dev foo.zone irregular.ninja snonux.land/;
+our @acme_hosts = qw/buetow.org paul.buetow.org tmp.buetow.org dory.buetow.org footos.buetow.org znc.buetow.org dtail.dev foo.zone irregular.ninja snonux.land/;
# UTILITY TASKS
@@ -93,7 +99,10 @@ task 'base', group => 'frontends',
pkg 'vger', ensure => present;
pkg 'zsh', ensure => present;
- append_if_no_such_line '/etc/rc.conf.local', 'pkg_scripts="uptimed httpd failunderd dserver"';
+ my @pkg_scripts = qw/uptimed httpd dserver/;
+ push @pkg_scripts, 'znc' if connection->server eq $ircbouncer_server;
+ my $pkg_scripts = join ' ', @pkg_scripts;
+ append_if_no_such_line '/etc/rc.conf.local', "pkg_scripts=\"$pkg_scripts\"";
file '/etc/myname',
content => template('./etc/myname.tpl', fqdns => $fqdns),
@@ -373,10 +382,11 @@ task 'dtail', group => 'frontends',
service 'dserver', ensure => 'started';
};
-desc 'Setup failunderd';
-task 'failunderd', group => 'frontends',
+desc 'Setup IRC bouncer';
+task 'ircbouncer', group => 'ircbouncer',
sub {
-
+ pkg 'znc', ensure => present;
+ service 'znc', ensure => 'started';
};
# COMBINED TASKS SECTION
@@ -396,7 +406,6 @@ task 'commons', group => 'frontends',
rsync();
# Requires manually installing the binary!
# dtail();
- failunderd();
};
1;
diff --git a/frontends/var/nsd/zones/master/buetow.org.zone.tpl b/frontends/var/nsd/zones/master/buetow.org.zone.tpl
index 7489887..c36df55 100644
--- a/frontends/var/nsd/zones/master/buetow.org.zone.tpl
+++ b/frontends/var/nsd/zones/master/buetow.org.zone.tpl
@@ -43,6 +43,7 @@ fishfinger 86400 IN AAAA 2a03:6000:6f67:624::99
git2 3600 IN CNAME fishfinger
www 3600 IN CNAME fishfinger
www.tmp 3600 IN CNAME fishfinger
+www.znc 3600 IN CNAME fishfinger
www.dory 3600 IN CNAME fishfinger
www.footos 3600 IN CNAME fishfinger
www.paul 3600 IN CNAME fishfinger
@@ -52,6 +53,7 @@ vulcan 86400 IN AAAA 2a01:4f9:c010:250e::1
vu 86400 IN CNAME vulcan
wolke7 3600 IN CNAME vulcan
edge 3600 IN CNAME vulcan
+bnc 3600 IN CNAME www.znc
zapad.sofia 86400 IN CNAME 79-100-3-54.ip.btc-net.bg.
www2 3600 IN CNAME snonux.codeberg.page.