aboutsummaryrefslogtreecommitdiff
path: root/net-im/iserverd/files/iserverd.in
blob: 03ab57f680331e5e1f978d33ebdfd3542ea20f0f (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
34
35
36
#!/bin/sh

# PROVIDE: iserverd
# REQUIRE: LOGIN postgresql
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable iserverd:
#
#  iserverd_enable="YES"
#

name=iserverd

. /etc/rc.subr

load_rc_config $name

# set defaults
iserverd_enable=${iserverd_enable:-"NO"}
iserverd_user=iserv

rcvar=`set_rcvar`
command=%%PREFIX%%/bin/iserverd
command_args="-o"

pidfile="/var/run/iserverd/iserverd.pid"

start_cmd=iserverd_start

iserverd_start()
{
    su ${iserverd_user} -c "exec ${command} ${command_args}"
    echo "Starting iserverd."
}

run_rc_command "$1"