aboutsummaryrefslogtreecommitdiff
path: root/sysutils/digdag/files/digdag.in
blob: 2f3301d54c48ca73c021fb5bbe7a404fde191f34 (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
#
# $FreeBSD$
#
# PROVIDE: digdag
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# digdag_enable (bool):	Set to NO by default.
#			Set it to YES to enable it.
# digdag_user:		The user account the digdag daemon runs as.
#			It uses 'digdag' user by default.
#			Do not sets it as empty or it will run as root.
# digdag_conf:		The configuration file digdag uses.    
#			Default: %%PREFIX%%/etc/digdag.conf
# digdag_logfile:	The log file digdag uses.
#			Default: /var/log/digdag/digdag.log

. /etc/rc.subr
name="digdag"
rcvar="${name}_enable"
load_rc_config ${name}

: ${digdag_enable:="NO"}
: ${digdag_user:="digdag"}
: ${digdag_conf:="%%PREFIX%%/etc/digdag.conf"}
: ${digdag_logfile="/var/log/digdag/digdag.log"}

command="/usr/sbin/daemon"
pidfile=/var/run/digdag/digdag.pid
procname="%%JAVA%%"
digdag_flags="-f -p ${pidfile} ${name} server --log ${digdag_logfile} --config ${digdag_conf}"

run_rc_command "$1"