summaryrefslogtreecommitdiff
blob: 2db36571dac0fbf27179069248ac9f0f31a09ab7 (plain)
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
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

ACE_LIB="lib/ace.jar"
DAEMON="${JAVA_HOME-/etc/java-config-2/current-system-vm}"/bin/java
JAVA_OPTS="-Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp -Djava.library.path="
UNIFI_PATH="/usr/lib/unifi"

UNIFI_USER="unifi"
UNIFI_GROUP="unifi"

name="UniFi Controller"

start_stop_daemon_args="--chdir ${UNIFI_PATH}"

command="${DAEMON}"
command_args="${JAVA_OPTS} -jar ${ACE_LIB} start"
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"

command_user="${UNIFI_USER}:${UNIFI_GROUP}"

command_progress=true
retry=TERM/60