summaryrefslogtreecommitdiff
path: root/recipes/exalt/exalt-daemon/init
blob: cbceed179393636b9a482d9553f121404b471e9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
set -e

#need dbus and hald

start() {
    echo -n "Starting Exalt daemon..."
    start-stop-daemon --start --exec /usr/sbin/exalt-daemon \
        --pidfile /var/run/exaltd.pid
    echo "done."
}

stop() {
    echo -n "Stopping Exalt daemon..."
    start-stop-daemon --stop --exec /usr/sbin/exalt-daemon \
	--pidfile /var/run/exaltd.pid
    echo "done."
}

case "$1" in
    start)
	start
	;;
    stop)
	stop
	;;
    restart)
	stop
	sleep 2
	start
	;;
    *)
	echo "Usage: $(basename $0) {start|stop|restart}"
	exit 1
esac

exit 0