/[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 2818 - (show annotations) (download)
Wed Dec 23 15:16:21 2015 UTC (5 years, 9 months ago) by davidg
File size: 1262 byte(s)
Incorporate SUSE fixed from Jurriaan

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 ### BEGIN INIT INFO
13 # Provides: fetch-crl-cron
14 # Required-Start: $remote_fs
15 # Required-Stop: $remote_fs
16 # Default-Start: 3 5
17 # Default-Stop: 0 2 1 6
18 # Description: Run the certificate revocation lists update periodically via cron
19 ### END INIT INFO
20
21 # source function library
22 . /etc/rc.d/init.d/functions
23
24 lockfile=/var/lock/subsys/fetch-crl-cron
25
26 RETVAL=0
27
28 start() {
29 action $"Enabling periodic fetch-crl: " touch "$lockfile"
30 RETVAL=$?
31 }
32
33 stop() {
34 action $"Disabling periodic fetch-crl: " rm -f "$lockfile"
35 RETVAL=$?
36 }
37
38 case "$1" in
39 start)
40 start
41 ;;
42 stop)
43 stop
44 ;;
45 restart|force-reload)
46 $0 stop
47 $0 start
48 ;;
49 reload)
50 ;;
51 condrestart)
52 [ -f "$lockfile" ] && {
53 $0 stop
54 $0 start
55 }
56 ;;
57 status)
58 if [ -f $lockfile ]; then
59 echo $"Periodic fetch-crl is enabled."
60 RETVAL=0
61 else
62 echo $"Periodic fetch-crl is disabled."
63 RETVAL=3
64 fi
65 ;;
66 *)
67 echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
68 exit 1
69 esac
70
71 exit $RETVAL

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