updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / epson-c65_c66-epkowa-driver / ekpd
blob6a74e39e2555379ad0054e23b46e271d3683bbd9
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/local/EPKowa/printer/ekpd`
8 case "$1" in
9 start)
10 stat_busy "Starting Epson printer deamon"
11 [ -z "$PID" ] && /usr/local/EPKowa/printer/ekpd &>/dev/null
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 PID=`pidof -o %PPID /usr/local/EPKowa/printer/ekpd`
16 echo $PID >/var/run/ekpd.pid
17 add_daemon ekpd
18 stat_done
22 stop)
23 stat_busy "Stopping Epson printer deamon"
24 [ ! -z "$PID" ] && kill $PID &>/dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon ekpd
29 stat_done
33 restart)
34 $0 stop
35 $0 start
39 echo "usage: $0 { start | stop | restart }"
41 esac
42 exit 0