1

cleanup cacd.sh

This commit is contained in:
eleksir
2016-09-04 22:53:36 +03:00
parent 638bfc2c90
commit 302bd9a9cd

15
cacd.sh
View File

@@ -1,25 +1,28 @@
#!/bin/sh #!/bin/sh
# For Administration # For Administration
test -f /usr/bin/cacd || exit 0 [ -f /usr/bin/cacd ] || exit 0
case "$1" in case "$1" in
start) "start")
echo -n "Start cacd:" echo -n "Start cacd:"
/sbin/daemon_mgr cacd start "/usr/bin/cacd &" 2>/dev/null > /dev/null /sbin/daemon_mgr cacd start "/usr/bin/cacd &" 2>/dev/null > /dev/null
echo -n " cacd" echo -n " cacd"
echo "." echo "."
;; ;;
stop)
"stop")
echo -n "Shutting down cacd:" echo -n "Shutting down cacd:"
/sbin/daemon_mgr cacd stop /usr/bin/cacd 2>/dev/null > /dev/null /sbin/daemon_mgr cacd stop /usr/bin/cacd 2>/dev/null > /dev/null
echo -n " cacd" echo -n " cacd"
echo "." echo "."
;; ;;
restart)
$0 stop "restart")
$0 start "$0" stop
"$0" start
;; ;;
*) *)
echo "Usage: /etc/init.d/cacd.sh {start|stop|restart}" echo "Usage: /etc/init.d/cacd.sh {start|stop|restart}"
exit 1 exit 1