aboutsummaryrefslogtreecommitdiffstats
path: root/non-free/unifi/unifi.initd
blob: 802f85b7b7b14accc5795e81e6b74e832cd77097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/sbin/openrc-run

name="Unifi Controller"
supervisor=supervise-daemon
command=/usr/bin/java
command_args="-jar lib/ace.jar start ${OPTS}"
: ${command_user="unifi"}
pidfile=/run/unifi/${RC_SVCNAME}.pid
command_background=yes
supervise_daemon_args="--chdir /usr/lib/unifi \
	--stdout /var/log/unifi/${RC_SVCNAME}.log \
	--stderr /var/log/unifi/${RC_SVCNAME}.log"

start_pre() {
        checkpath --directory --owner $command_user --mode 0775 \
                /run/unifi /var/log/unifi
}