provision.pl -- added ngircd and configuration
This commit is contained in:
parent
2d9e582c00
commit
821e0ab9d4
@ -173,6 +173,28 @@ system("cp ./perl-script/conf/haproxy.cfg /etc/haproxy/haproxy.cfg");
|
|||||||
system("rcctl enable haproxy");
|
system("rcctl enable haproxy");
|
||||||
system("rcctl start haproxy");
|
system("rcctl start haproxy");
|
||||||
|
|
||||||
|
# Install and configure ngircd and delegation
|
||||||
|
system("pkg_add ngircd");
|
||||||
|
|
||||||
|
# irc group is used for granting permissions
|
||||||
|
# to irc admins
|
||||||
|
system("groupadd irc");
|
||||||
|
system("usermod -G irc _ngircd");
|
||||||
|
# allow doas for irc admins
|
||||||
|
system("echo 'permit nopass :irc as _ngircd' >> /etc/doas.conf");
|
||||||
|
|
||||||
|
# Copy over our conf file to /etc
|
||||||
|
# and set permissions
|
||||||
|
system("chmod 750 /etc/ngircd");
|
||||||
|
system("cp ./perl-script/conf/ngircd.conf /etc/ngircd/ngircd.conf");
|
||||||
|
system("chmod -R 660 /etc/ngircd/*");
|
||||||
|
system("chown -R _ngircd:irc /etc/ngircd/");
|
||||||
|
|
||||||
|
# copy over our admin script and set permissions
|
||||||
|
system("cp ./perl-script/ngircd-ctl /usr/local/sbin/ngircd-ctl");
|
||||||
|
system("chown _ngircd:irc /usr/local/sbin/ngircd-ctl");
|
||||||
|
system("chmod 770 /usr/local/sbin/ngircd-ctl");
|
||||||
|
|
||||||
# Disable root login
|
# Disable root login
|
||||||
system("sed -i -e 's/^[^#]*PermitRootLogin.*\$/PermitRootLogin no/' /etc/ssh/sshd_config");
|
system("sed -i -e 's/^[^#]*PermitRootLogin.*\$/PermitRootLogin no/' /etc/ssh/sshd_config");
|
||||||
system("sed -i -e 's/^PasswordAuthentication.*$//' /etc/ssh/sshd_config");
|
system("sed -i -e 's/^PasswordAuthentication.*$//' /etc/ssh/sshd_config");
|
||||||
|
Loading…
Reference in New Issue
Block a user