summaryrefslogtreecommitdiff
path: root/www/instiki/files/instiki.sh
blob: d4a50d41a4ee20a43248bfac0d98ec408ca6b81c (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
#!/bin/sh
#
# PROVIDE: instiki
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf to enable instiki:
# instiki_enable (bool):      Set to "NO" by default
#                             Set it to "YES" to enable instiki
# instiki_flags (str):        Set to "--port %%INSTIKIPORT%% --storage %%PREFIX%%/%%INSTIKIDIR%%/storage --daemon" by default.
#                             Extra flags passed to start command
#
. %%RC_SUBR%%

name="instiki"
rcvar=`set_rcvar`

command="%%PREFIX%%/%%INSTIKIDIR%%/instiki"
command_interpreter="%%RUBY_WITH_SUFFIX%%"

[ -z "$instiki_enable" ]	&& instiki_enable="NO"
[ -z "$instiki_flags" ]	&& instiki_flags="--port %%INSTIKIPORT%% --storage %%PREFIX%%/%%INSTIKIDIR%%/storage --daemon"

load_rc_config $name

sig_stop=-TERM

run_rc_command "$1"