Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@karaage0703
Created October 2, 2014 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karaage0703/b83b97ab5bbfb9503381 to your computer and use it in GitHub Desktop.
Save karaage0703/b83b97ab5bbfb9503381 to your computer and use it in GitHub Desktop.
nakayoshi camera auto boot script
### 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