49 lines
830 B
Bash
49 lines
830 B
Bash
#! /bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: ssdled
|
|
# Required-Start:
|
|
# Required-Stop:
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: Starts & Stops ssdled
|
|
# Description: Starts & Stops ssdled
|
|
### END INIT INFO
|
|
|
|
start () {
|
|
/usr/bin/ssdled -d
|
|
touch /var/lock/subsys/ssdled
|
|
}
|
|
|
|
stop () {
|
|
killall ssdled
|
|
rm -f /var/lock/subsys/ssdled
|
|
}
|
|
|
|
#Switch case fuer den ersten Parameter
|
|
case "$1" in
|
|
start)
|
|
#Aktion wenn start uebergeben wird
|
|
start
|
|
echo "Starte ssdled"
|
|
;;
|
|
|
|
stop)
|
|
#Aktion wenn stop uebergeben wird
|
|
stop
|
|
echo "Stoppe ssdled"
|
|
;;
|
|
|
|
restart)
|
|
#Aktion wenn restart uebergeben wird
|
|
stop
|
|
start
|
|
echo "Restarte ssdled"
|
|
;;
|
|
*)
|
|
#Standard Aktion wenn start|stop|restart nicht passen
|
|
echo "(start|stop|restart)"
|
|
;;
|
|
esac
|
|
|
|
exit 0
|