summarylogtreecommitdiffstats
path: root/ircd-ratbox.install
blob: 3012e2f9c11bb927ecf3f538e57d3cee88180033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
post_upgrade() {
    systemd-tmpfiles --create ircd-ratbox.conf

    cat << EOF

  Before starting the ircd, reload system modules by running:

    systemctl daemon-reload

  If you haven't previously done so, copy /etc/ircd-ratbox/example.conf
  to /etc/ircd-ratbox/ircd.conf and configure it to your needs carefully.

  Once things are configured, you can start the ircd by running:

    systemctl start ircd-ratbox

  You can also have the ircd start automatically at boot by running:

    systemctl enable ircd-ratbox

EOF
}

post_install() {
    [[ ! `grep ircd /etc/passwd` ]] && useradd -r -U -s /bin/false -d / ircd && echo "Created 'ircd' user and group"
    chown -R ircd.ircd /etc/ircd-ratbox
    post_upgrade
}

post_remove() {
    [[ `grep ircd /etc/passwd` ]] && userdel ircd && echo "Removed 'ircd' user and group"
    return 0
}