blob: 85d6af45d8a12ca468e8c8b29040cd567730ec88 (
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_flags="%%ETCDIR%%/orthanc.json"}
start_precmd=orthanc_prestart
pidfile=/var/run/orthanc.pid
procname=%%PREFIX%%/sbin/Orthanc
command=/usr/sbin/daemon
command_args=" -f -p ${pidfile} -u orthanc ${procname} ${orthanc_flags}"
orthanc_prestart()
{
# Have to empty rc_flags so they don't get passed to daemon(8)
rc_flags=""
}
run_rc_command "$1"
|