Create ssdled.sh
This commit is contained in:
parent
ef82f924b3
commit
3050254bed
48
ssdled.sh
Normal file
48
ssdled.sh
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#! /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
|
Loading…
Reference in New Issue
Block a user