aboutsummaryrefslogtreecommitdiff
path: root/net-im/iserverd/files/iserverd.in
blob: 22d49beaa80809e0c90bacd387bf8fdb28fa3bcd (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
37
#!/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
prefix=%%PREFIX%%

. %%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"