Commit e84b8467 authored by Russ Fish's avatar Russ Fish

Run-scripts for /etc/init.d

parent 653b7d81
#! /bin/sh
# chkconfig: 2345 30 90
# description: Vision camera checker software.
# Source function library.
. /etc/rc.d/init.d/functions
PORTBASE=6100
CAMERAS="0 1 2 3"
case "$1" in
start)
for cam in $CAMERAS; do
mezzopt=/etc/mezzanine/mezzanine.opt.camera$cam
mezzvid=/tmp/mezz_instance/dev/video$cam.ipc
checklog=/var/log/check.camera$cam.log
/usr/testbed/sbin/camera_checker \
-C $cam -f $mezzopt -F $checklog $mezzvid -m fish@cs.utah.edu 2>&1 &
echo $! > /var/run/camera_checker.$cam.pid
PORTBASE=`expr $PORTBASE + 1`
done
;;
stop)
for cam in $CAMERAS; do
kill `cat /var/run/camera_checker.$cam.pid`
rm /var/run/camera_checker.$cam.pid
done
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` {start|stop|restart}" >&2
;;
esac
exit 0
#! /bin/sh
# chkconfig: 2345 30 90
# description: Vision master control client software.
# Source function library.
. /etc/rc.d/init.d/functions
PORTBASE=6100
CAMERAS="0 1 2 3"
case "$1" in
start)
for cam in $CAMERAS; do
/usr/testbed/sbin/vmc-client -d -p $PORTBASE \
`cat /etc/vmc-client/client.$cam` \
/tmp/mezz_instance/dev/video${cam}.ipc \
> /var/log/vmc-client.$cam.log 2>&1 &
echo $! > /var/run/vmc-client.$cam.pid
PORTBASE=`expr $PORTBASE + 1`
done
;;
stop)
for cam in $CAMERAS; do
kill `cat /var/run/vmc-client.$cam.pid`
rm /var/run/vmc-client.$cam.pid
done
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` {start|stop|restart}" >&2
;;
esac
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment