10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
17 [ -f /etc/sysconfig/camserv ] && . /etc/sysconfig/camserv
19 # Check that networking is up.
20 if is_yes "${NETWORKING}"; then
21 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a "$1" != init ]; then
22 msg_network_down camserv
30 # See how we were called.
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/camserv ]; then
36 daemon /usr/bin/setsid /usr/bin/camserv
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/camserv
40 msg_already_running camserv
44 if [ -f /var/lock/subsys/camserv ]; then
47 rm -f /var/run/camserv.pid /var/lock/subsys/camserv >/dev/null 2>&1
49 msg_not_running camserv
62 if [ -f /var/lock/subsys/camserv ]; then
67 msg_not_running camserv >&2
72 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"