blob: 529a1a62fd52044c6939b49d97b94257f678edb7 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/sh
# PROVIDE: prayer
# REQUIRE: LOGIN
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# prayer_enable (bool): Set to NO by default.
# prayer_chrooted (bool): Set to NO by default.
# Force prayer to be executed in chrooted
# prayer_prefork (bool): Set to NO by default.
# Allow prayer to prefork itself at startup
#
. %%RC_SUBR%%
name="prayer"
rcvar=${name}_enable
command=%%PREFIX%%/sbin/${name}
pidfile="/var/spool/prayer/pid/${name}.pid"
start_precmd="prayer_prestart"
stop_postcmd="prayer_poststop"
load_rc_config $name
: ${prayer_enable="NO"}
: ${prayer_chrooted="NO"}
: ${prayer_prefork="NO"}
prayer_prestart()
{
if checkyesno prayer_enable; then
if checkyesno prayer_chrooted; then
echo "Chroot no fully functionnal for now so not activated"
# command=/usr/local/sbin/${name}-chroot
fi
if ! checkyesno prayer_prefork; then
command_args="--disable-prefork"
fi
fi
return 0
}
prayer_poststop()
{
kill -15 `head -1 /var/spool/prayer/pid/${name}-session.pid`
}
run_rc_command "$1"
|