/[pdpsoft]/nl.nikhef.pdp.fetchcrl/trunk/fetch-crl-cron.init
ViewVC logotype

Contents of /nl.nikhef.pdp.fetchcrl/trunk/fetch-crl-cron.init

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2277 - (show annotations) (download)
Mon Apr 11 06:54:34 2011 UTC (10 years, 7 months ago) by davidg
File size: 1006 byte(s)
Moved fetch-crl to seprarate repo tree

1 #!/bin/sh
2 #
3 # fetch-crl-cron This shell script enables periodic CRL retrieval via cron
4 #
5 # chkconfig: - 65 01
6 #
7 # description: Run the certificate revocation lists update periodically via cron
8 # processname: fetch-crl-cron
9 # config: /etc/fetch-crl.conf
10 #
11
12 # source function library
13 . /etc/rc.d/init.d/functions
14
15 lockfile=/var/lock/subsys/fetch-crl-cron
16
17 RETVAL=0
18
19 start() {
20 action $"Enabling periodic fetch-crl: " touch "$lockfile"
21 RETVAL=$?
22 }
23
24 stop() {
25 action $"Disabling periodic fetch-crl: " rm -f "$lockfile"
26 RETVAL=$?
27 }
28
29 case "$1" in
30 start)
31 start
32 ;;
33 stop)
34 stop
35 ;;
36 restart|force-reload)
37 $0 stop
38 $0 start
39 ;;
40 reload)
41 ;;
42 condrestart)
43 [ -f "$lockfile" ] && {
44 $0 stop
45 $0 start
46 }
47 ;;
48 status)
49 if [ -f $lockfile ]; then
50 echo $"Periodic fetch-crl is enabled."
51 RETVAL=0
52 else
53 echo $"Periodic fetch-crl is disabled."
54 RETVAL=3
55 fi
56 ;;
57 *)
58 echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
59 exit 1
60 esac
61
62 exit $RETVAL

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28