-
Notifications
You must be signed in to change notification settings - Fork 1
/
saveclock.init.in
55 lines (49 loc) · 1.06 KB
/
saveclock.init.in
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
#
# saveclock This script starts and stops the saveclock daemon
#
# chkconfig: 2345 03 98
#
# description: saveclock is a daemon that restores and saves the system
# clock in a file.
# processname: saveclock
# Source function library.
. @SYSCONFDIR@/rc.d/init.d/functions
FLAGS=
[ -f @SYSCONFDIR@/sysconfig/saveclock ] && . @SYSCONFDIR@/sysconfig/saveclock
[ -x @SBINDIR@/saveclock ] || exit 0
PATH="${PATH}:/usr/bin:/usr/local/bin"
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n "Starting saveclock: "
daemon @SBINDIR@/saveclock -d ${FLAGS}
RETVAL=$?
echo
;;
stop)
# Stop daemon.
echo -n "Shutting down saveclock: "
killproc saveclock
RETVAL=$?
echo
;;
restart)
$0 stop
$0 start
;;
condrestart)
if [ -f @LOCKDIR@/saveclock ]
then $0 stop
$0 start
fi
;;
status)
status saveclock
;;
*)
echo "Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit 0