blob: e097105af5ecb69a34d1fd0abb0b608be0015f6c (
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
|
#!/bin/sh
# PROVIDE: tentacle_server
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable `tentacle_server':
#
# tentacle_server_enable="YES"
#
. "/etc/rc.subr"
name="tentacle_server"
rcvar=`set_rcvar`
load_rc_config $name
# set defaults
: ${tentacle_server_enable:=NO}
: ${tentacle_server_flags:="-a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -i.*\.conf:conf\;.*\.md5:md5\;.*\.zip:collections"}
: ${tentacle_server_user:=pandora}
pidfile=/var/run/$name.pid
command="/usr/sbin/daemon"
command_args="-cf -p ${pidfile} -u ${tentacle_server_user} %%PREFIX%%/bin/${name} ${tentacle_server_flags}"
procname="%%PERL%%"
start_cmd=start_cmd
stop_postcmd=stop_postcmd
start_cmd() {
check_startmsgs && echo "Starting ${name}."
touch $pidfile
chown $tentacle_server_user $pidfile
$command $command_args
}
stop_postcmd() {
rm -f $pidfile
}
run_rc_command "$1"
|