summaryrefslogtreecommitdiffstats
path: root/net-wireless/unifi/files/unifi.init
diff options
context:
space:
mode:
Diffstat (limited to 'net-wireless/unifi/files/unifi.init')
-rw-r--r--net-wireless/unifi/files/unifi.init28
1 files changed, 28 insertions, 0 deletions
diff --git a/net-wireless/unifi/files/unifi.init b/net-wireless/unifi/files/unifi.init
new file mode 100644
index 0000000..fc2e40d
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.init
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+PID_FILE="/var/run/unifi.pid"
+DAEMON="${JAVA_HOME-/usr}"/bin/java
+UNIFI_PATH="/usr/lib/unifi"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting unifi"
+ cd "${UNIFI_PATH}"
+ start-stop-daemon --start --quiet -b \
+ --pidfile "${PID_FILE}" -m \
+ --exec ${DAEMON} -- -jar lib/ace.jar start
+ eend $?
+ #--user nobody --group nobody \
+}
+
+stop() {
+ ebegin "Stopping unifi"
+ start-stop-daemon --quiet --stop -R 20 --pidfile "${PID_FILE}"
+ eend $?
+}