#!/bin/sh

doas mkdir /var/ngircd/etc/
doas cp /etc/resolv.conf /var/ngircd/etc/
doas cp -R /etc/ngircd /var/ngircd/etc/
doas chown -R _ngircd:_ngircd /var/ngircd/
doas rm -r /etc/ngircd
doas ln -s /var/ngircd/etc/ngircd /etc/ngircd
doas mkdir -p /var/ngircd/usr/local/share/doc/
doas cp -R /usr/local/share/doc/ngircd/ /var/ngircd/usr/local/share/doc/
doas chown -R _ngircd:_ngircd /var/ngircd/usr/local/share/doc/ngircd/
doas mkdir -p /var/ngircd/var/run/ngircd/
doas chown -R _ngircd:_ngircd /var/ngircd/var/