blob: a4b8a0c5b85c1901cb1208eeddcca1b7833cadad (
plain) (
blame)
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
|
#!/bin/sh
#
# PROVIDE: soju
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# soju_enable (bool): Set to NO by default.
# Set it to YES to enable soju.
# soju_config (path): Set to %%PREFIX%%/etc/soju/config
# by default.
. /etc/rc.subr
name="soju"
rcvar=soju_enable
desc="Soju IRC bouncer"
: ${soju_enable:=NO}
: ${soju_config:=%%PREFIX%%/etc/soju/config}
command=/usr/sbin/daemon
procname="%%PREFIX%%/bin/soju"
pidfile=/var/run/${name}.pid
command_args="-P /var/run/daemon_${name}.pid -p $pidfile -u %%USER%% -S -c -T $name -f $procname -config ${soju_config}"
start_precmd="mkdir -p /var/run/soju && chown %%USER%%: /var/run/soju"
extra_commands="reload"
load_rc_config $name
run_rc_command "$1"
|