/[pdpsoft]/nl.nikhef.pdp.fetchcrl/tags/fetch-crl-3.0.19/fetch-crl-boot.init
ViewVC logotype

Contents of /nl.nikhef.pdp.fetchcrl/tags/fetch-crl-3.0.19/fetch-crl-boot.init

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3174 - (show annotations) (download)
Tue Mar 21 07:54:44 2017 UTC (4 years, 7 months ago) by davidg
File size: 1767 byte(s)
Released 3.0.19 fixing DER file writer

1 #!/bin/sh
2 #
3 # fetch-crl-boot This shell script trigger a run of fetch-crl at boot time
4 #
5 # chkconfig: - 65 01
6 #
7 # description: Run of fetch-crl, a crl updater, on boot up
8 # processname: fetch-crl
9 # config: /etc/fetch-crl.conf
10 # config: /etc/sysconfig/fetch-crl
11
12 ### BEGIN INIT INFO
13 # Provides: fetch-crl
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 of fetch-crl, a crl updater, on boot up
19 ### END INIT INFO
20
21
22 # fetch-crl-boot must run after the start of xinetd and afs, since the URLs
23 # may point to files on an AFS file system or to xinetd-based service URLs
24
25 # source function library
26 . /etc/rc.d/init.d/functions
27
28 # source any environment settings, e.g. for HTTP proxies
29 [ -f /etc/sysconfig/fetch-crl ] && . /etc/sysconfig/fetch-crl
30
31 lockfile=/var/lock/subsys/fetch-crl-boot
32
33 RETVAL=0
34
35 start() {
36 if [ ! -f $lockfile ]; then
37 action $"Running fetch-crl on boot: " /usr/sbin/fetch-crl -q $FETCHCRL_OPTIONS $FETCHCRL_BOOT_OPTIONS
38 RETVAL=$?
39 [ "$RETVAL" = 0 -o "$RETVAL" = 2 ] && touch $lockfile
40 else
41 RETVAL=0
42 fi
43 }
44
45 stop() {
46 RETVAL=0
47 [ "$RETVAL" = 0 ] && rm -f $lockfile
48 }
49
50 case "$1" in
51 start)
52 start
53 ;;
54 stop)
55 stop
56 ;;
57 restart|force-reload)
58 $0 stop
59 $0 start
60 ;;
61 condrestart)
62 [ -f $lockfile ] && {
63 $0 stop
64 $0 start
65 }
66 ;;
67 reload)
68 ;;
69 status)
70 if [ -f $lockfile ] ; then
71 echo -n $"fetch-crl-boot lockfile present" && success
72 RETVAL=0
73 else
74 echo -n $"fetch-crl-boot lockfile missing" && failure
75 RETVAL=1
76 fi
77 echo
78 ;;
79 *)
80 echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
81 exit 1
82 esac
83
84 exit $RETVAL

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