Created
October 2, 2014 13:08
-
-
Save karaage0703/b83b97ab5bbfb9503381 to your computer and use it in GitHub Desktop.
nakayoshi camera auto boot script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### BEGIN INIT INFO | |
# Provides: camera_normal | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start Camera Normal Server at boot time | |
# Description: Start Camera Normal Server at boot time | |
### END INIT INFO | |
#! /bin/sh | |
# /etc/init.d/camera_normal | |
PIDFILE=/var/run/camera_normal.pid | |
case "$1" in | |
start) | |
if [ -f $PIDFILE ]; then | |
echo $PIDFILE exists. | |
exit 1 | |
fi | |
start-stop-daemon -S -x /usr/local/sbin/camera_normal.sh -b -m -p $PIDFILE | |
;; | |
stop) | |
if [ ! -f $PIDFILE ]; then | |
echo $PIDFILE not found. | |
exit 1 | |
fi | |
start-stop-daemon -K -p $PIDFILE | |
rm $PIDFILE | |
;; | |
*) | |
echo "Usage: /etc/init.d/camera_normal {start|stop}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment