blob: 9cbe3d1cd3213b69de759522bee5f7541611500f (
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
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: orthanc
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# orthanc_enable (bool): Set to NO by default.
# Set it to YES to enable Orthanc.
# orthanc_flags (str): Set to %%ETCDIR%%/orthanc.json
# by default.
. /etc/rc.subr
name=orthanc
rcvar=orthanc_enable
desc="Lightweight DICOM server for healthcare and medical research"
load_rc_config $name
: ${orthanc_enable:=NO}
: ${orthanc_config="%%ETCDIR%%/orthanc.json"}
start_precmd=orthanc_prestart
pidfile=/var/run/orthanc.pid
procname=%%PREFIX%%/sbin/Orthanc
command=/usr/sbin/daemon
command_args=" --output-file /var/log/orthanc --sighup --child-pidfile ${pidfile} --user orthanc ${procname} ${orthanc_flags} ${orthanc_config}"
orthanc_prestart()
{
# Have to empty rc_flags so they don't get passed to daemon(8)
rc_flags=""
}
run_rc_command "$1"
|