23
|
1 #! /bin/sh
|
|
2 ### BEGIN INIT INFO
|
|
3 # Provides: atd
|
|
4 # Required-Start: $syslog $time $remote_fs
|
|
5 # Required-Stop: $syslog $time $remote_fs
|
|
6 # Default-Start: 2 3 4 5
|
|
7 # Default-Stop: 0 1 6
|
|
8 # Short-Description: Deferred execution scheduler
|
|
9 # Description: Debian init script for the atd deferred executions
|
|
10 # scheduler
|
|
11 ### END INIT INFO
|
|
12 #
|
|
13 # Author: TaikiTAIRA
|
|
14 #
|
|
15
|
|
16 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin
|
|
17 DAEMON=/usr/local/sbin/libvirtd
|
|
18 PIDFILE=/usr/local/var/run/libvirtd.pid
|
|
19
|
|
20 test -x $DAEMON || exit 0
|
|
21
|
|
22 . /lib/lsb/init-functions
|
|
23
|
|
24 case "$1" in
|
|
25 start)
|
|
26 log_daemon_msg "Starting libvirt daemon." "libvirt"
|
|
27 start_daemon -p $PIDFILE $DAEMON -d
|
|
28 log_end_msg $?
|
|
29 ;;
|
|
30 stop)
|
|
31 log_daemon_msg "Stopping stop libvirt daemon" "libvirt"
|
|
32 killproc -p $PIDFILE $DAEMON
|
|
33 log_end_msg $?
|
|
34 ;;
|
|
35 force-reload|restart)
|
|
36 $0 stop
|
|
37 $0 start
|
|
38 ;;
|
|
39 status)
|
|
40 status_of_proc -p $PIDFILE $DAEMON libvirtd && exit 0 || exit $?
|
|
41 ;;
|
|
42 *)
|
|
43 echo "Usage: /etc/init.d/libvirtd {start|stop|restart|force-reload|status}"
|
|
44 exit 1
|
|
45 ;;
|
|
46 esac
|
|
47
|
|
48 exit 0
|