blob: faf837a534e3c58029ee7aa478859d6ca6d171d0 (
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
|
#!/bin/sh
# PROVIDE: semaphore
# REQUIRE: mysql
# KEYWORD: shutdown
. /etc/rc.subr
name=semaphore
rcvar=semaphore_enable
load_rc_config ${name}
: ${semaphore_enable:="NO"}
: ${semaphore_config="%%PREFIX%%/etc/semaphore/semaphore_config.json"}
export PATH=${PATH}:%%PREFIX%%/bin
pidfile="/var/run/${name}.pid"
procname="%%PREFIX%%/bin/semaphore"
command="/usr/sbin/daemon"
command_args="-f -c -p ${pidfile} /usr/bin/env ${semaphore_env} ${procname} -config \"${semaphore_config}\""
run_rc_command "$1"
|