diff options
author | Tim Dickson <dickson.tim@googlemail.com> | 2020-10-01 19:47:40 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-10-03 09:01:42 +0700 |
commit | 8adbacc0058d79d26ddf417d277a5756f5cb74a7 (patch) | |
tree | ebb84c72edb9d99b5ff0c03530dc20524fb393b4 /system/epson-printer-utility/rc.ecbd | |
parent | 880f42641e0a11b722405037900da73fa1baa8db (diff) |
system/epson-printer-utility: Added (epson printer monitor+tools)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/epson-printer-utility/rc.ecbd')
-rw-r--r-- | system/epson-printer-utility/rc.ecbd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/system/epson-printer-utility/rc.ecbd b/system/epson-printer-utility/rc.ecbd new file mode 100644 index 0000000000000..c534fab9aa89e --- /dev/null +++ b/system/epson-printer-utility/rc.ecbd @@ -0,0 +1,33 @@ +#!/bin/sh +#script to start/stop etc epson communication backend daemon ecbd + +if [ ! -x /usr/lib/epson-backend/ecbd ]; then + echo "/usr/lib/epson-backend/ecbd not executable" + exit 1 +fi +PIDFILE=/var/run/ecbd.pid +OPT=${1:-start} +case "$OPT" in +'start') + if [ `ps -A|grep ecbd|grep -v "rc.ecbd"|wc -l` -gt 0 ]||[ -e $PIDFILE ]; then + echo "ecbd is already running" + else + /usr/lib/epson-backend/ecbd -p $PIDFILE & + fi + ;; +'stop') + if [ -e /var/run/ecbd.pid ]; then + kill `cat $PIDFILE` + fi + rm -f $PIDFILE + ;; +'restart') + if [ -e $PIDFILE ]; then + kill `cat $PIDFILE` + fi + rm -f $PIDFILE + /usr/lib/epson-backend/ecbd -p $PIDFILE & + ;; +*) + echo "usage $0 start|stop|restart" +esac |