فهرست منبع

added init.d script for openwrt

Fabian Peter Hammerle 7 سال پیش
والد
کامیت
ac56563563
1فایلهای تغییر یافته به همراه18 افزوده شده و 0 حذف شده
  1. 18 0
      openwrt/init.d/omegalines

+ 18 - 0
openwrt/init.d/omegalines

@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+
+DAEMON_NAME=omegalines
+DAEMON_PATH=/usr/bin/omegalines
+PIDFILE=/var/run/$DAEMON_NAME.pid
+START=99
+
+# https://wiki.openwrt.org/doc/techref/initscripts
+
+start() {
+    echo "Starting $DAEMON_NAME daemon"
+	start-stop-daemon -S -b -p $PIDFILE -m -x $DAEMON_PATH
+}
+
+stop() {
+    echo "Stopping $DAEMON_NAME daemon"
+	start-stop-daemon -K -p $PIDFILE
+}