mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
40 lines
689 B
Bash
40 lines
689 B
Bash
#!/bin/sh
|
|
# Start/stop/restart lapsus.
|
|
# $Id: rc.lapsus,v 1.0 2007/11/28
|
|
# Author: Heinz Wiesinger <hmwiesinger@gmx.at>
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Start lapsus:
|
|
lapsus_start() {
|
|
if [ -x /usr/sbin/lapsusd ]; then
|
|
echo "Starting lapsus daemon: /usr/sbin/lapsusd "
|
|
/usr/sbin/lapsusd
|
|
fi
|
|
}
|
|
|
|
# Stop lapsus:
|
|
lapsus_stop() {
|
|
echo "Stopping lapsus daemon"
|
|
killall lapsusd 1> /dev/null 2> /dev/null
|
|
}
|
|
|
|
# Restart lapsus:
|
|
lapsus_restart() {
|
|
lapsus_stop
|
|
sleep 1
|
|
lapsus_start
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
lapsus_start
|
|
;;
|
|
'stop')
|
|
lapsus_stop
|
|
;;
|
|
'restart')
|
|
lapsus_restart
|
|
;;
|
|
*)
|
|
echo "usage $0 start|stop|restart"
|
|
esac
|