]> git.pld-linux.org Git - packages/etad.git/blame - etad.init
- tabs in preamble
[packages/etad.git] / etad.init
CommitLineData
e3886206 1#!/bin/sh
2#
ef1e95c3 3# etad This shell script takes care of starting and stopping
4# etad (ETA UPS daemon).
e3886206 5#
6# chkconfig: 2345 10 99
7#
8# description: etad is the print daemon required for etad to work properly. \
9# It is basically a server that monitor your UPS.
10#
11# processname: etad
12# config: /etc/sysconfig/etad
13
14
15# Source function library
16. /etc/rc.d/init.d/functions
17
e3886206 18# Get service config
19[ -f /etc/sysconfig/etad ] && . /etc/sysconfig/etad
20
6e7f0965 21RETVAL=0
e3886206 22# See how we were called.
23case "$1" in
24 start)
25 # Check if the service is already running?
ef1e95c3 26 if [ ! -f /var/lock/subsys/etad ]; then
27 msg_starting etad
28 daemon etad $PORT
29 RETVAL=$?
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/etad
31 else
32 msg_already_running Lpd
ef1e95c3 33 fi
34 ;;
e3886206 35 stop)
ef1e95c3 36 # Stop daemons.
37 if [ -f /var/lock/subsys/etad ]; then
38 msg_stopping Etad
39 killproc etad
40 rm -f /var/lock/subsys/etad >/dev/null 2>&1
41 else
42 msg_not_running etad
ef1e95c3 43 fi
44 ;;
e3886206 45 status)
46 status etad
47 exit $?
48 ;;
6e7f0965 49 restart|force-reload)
e3886206 50 $0 stop
51 $0 start
6e7f0965 52 exit $?
e3886206 53 ;;
54 *)
6e7f0965 55 msg_usage "$0 {start|stop|restart|force-reload|status}"
56 exit 3
e3886206 57esac
58
59exit $RETVAL
This page took 0.080406 seconds and 4 git commands to generate.