Commits

Zhang Huangbin committed ec166c5

Fix RC scripts.

  • Participants
  • Parent commits 3a6d722

Comments (0)

Files changed (6)

File rc_scripts/iredapd.debian

 
 PROG='iredapd'
 BINPATH='/opt/iredapd/iredapd.py'
-CONFIG='/opt/iredapd/etc/settings.ini'
 PIDFILE='/var/run/iredapd.pid'
 
 check_status() {
             echo "${PROG} is already running."
         else
             rm -f ${PIDFILE} >/dev/null 2>&1
-            echo "Starting ${PROG} ..."
-            python ${BINPATH} ${CONFIG}
         fi
-    else
-        echo "Starting ${PROG} ..."
-        python ${BINPATH} ${CONFIG}
     fi
+
+    echo "Starting ${PROG} ..."
+    python ${BINPATH}
     unset s
 }
 

File rc_scripts/iredapd.freebsd

 rcvar=`set_rcvar`
 
 BINPATH='/opt/iredapd/iredapd.py'
-CONFIG='/opt/iredapd/etc/settings.ini'
 pidfile='/var/run/iredapd.pid'
 
 check_status() {
             echo "${name} is already running."
         else
             rm -f ${pidfile} >/dev/null 2>&1
-            echo "Starting ${name} ..."
-            /usr/local/bin/python ${BINPATH} ${CONFIG}
         fi
-    else
-        echo "Starting ${name} ..."
-        /usr/local/bin/python ${BINPATH} ${CONFIG}
     fi
+
+    echo "Starting ${name} ..."
+    /usr/local/bin/python ${BINPATH}
     unset s
 }
 

File rc_scripts/iredapd.gentoo

 prog='/opt/iredapd/iredapd.py'
 progname="iRedAPD"
 
-CONFIG='/opt/iredapd/etc/settings.ini'
 PIDFILE='/var/run/iredapd.pid'
 
 depend() {
     ebegin "Starting ${SVCNAME}"
     # Use start stop daemon to apply system limits #347301 
     start-stop-daemon --start \
-        --exec python ${prog} ${CONFIG}
+        --exec python ${prog}
 
     eend $?
 }

File rc_scripts/iredapd.openbsd

 #!/bin/sh
 
-daemon='python /opt/iredapd/iredapd.py /opt/iredapd/etc/settings.ini'
+daemon='python /opt/iredapd/iredapd.py'
 
 . /etc/rc.d/rc.subr
 

File rc_scripts/iredapd.opensuse

 
 PROG='iredapd'
 BINPATH='/opt/iredapd/iredapd.py'
-CONFIG='/opt/iredapd/etc/settings.ini'
 PIDFILE='/var/run/iredapd.pid'
 
 check_status() {
             echo "${PROG} is already running."
         else
             rm -f ${PIDFILE} >/dev/null 2>&1
-            echo "Starting ${PROG} ..."
-            python ${BINPATH} ${CONFIG}
         fi
-    else
-        echo "Starting ${PROG} ..."
-        python ${BINPATH} ${CONFIG}
     fi
+
+    echo "Starting ${PROG} ..."
+    python ${BINPATH}
     unset s
 }
 

File rc_scripts/iredapd.rhel

 
 PROG='iredapd'
 BINPATH='/opt/iredapd/iredapd.py'
-CONFIG='/opt/iredapd/etc/settings.ini'
 PIDFILE='/var/run/iredapd.pid'
 
 check_status() {
             echo "${PROG} is already running."
         else
             rm -f ${PIDFILE} >/dev/null 2>&1
-            echo "Starting ${PROG} ..."
-            python ${BINPATH} ${CONFIG}
         fi
-    else
-        echo "Starting ${PROG} ..."
-        python ${BINPATH} ${CONFIG}
     fi
+
+    echo "Starting ${PROG} ..."
+    python ${BINPATH}
     unset s
 }