Revision: 7944
http://syscheck.svn.sourceforge.net/syscheck/?rev=7944&view=rev
Author: kinneh
Date: 2011-08-09 11:50:25 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
closes #54 add script to create crl:s
Added Paths:
-----------
trunk/syscheck/config/927.conf
trunk/syscheck/lang/927.english
trunk/syscheck/related-available/927_create_crls.sh
Added: trunk/syscheck/config/927.conf
===================================================================
--- trunk/syscheck/config/927.conf (rev 0)
+++ trunk/syscheck/config/927.conf 2011-08-09 11:50:25 UTC (rev 7944)
@@ -0,0 +1,2 @@
+# config for 927_create_crls.sh
+# no config
Added: trunk/syscheck/lang/927.english
===================================================================
--- trunk/syscheck/lang/927.english (rev 0)
+++ trunk/syscheck/lang/927.english 2011-08-09 11:50:25 UTC (rev 7944)
@@ -0,0 +1,8 @@
+HELP="Script to create the CRL:s from the CA:s options if needed"
+
+DESCR_1="Create CRL run successfully (%s)"
+HELP_1="No action needed"
+
+DESCR_2="Create CRL failed (%s)"
+HELP_2="Try manually to run this command or direct do 'cd $EJBCA_HOME ; ./bin/ejbca.sh ca createcrl'"
+
Added: trunk/syscheck/related-available/927_create_crls.sh
===================================================================
--- trunk/syscheck/related-available/927_create_crls.sh (rev 0)
+++ trunk/syscheck/related-available/927_create_crls.sh 2011-08-09 11:50:25 UTC (rev 7944)
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# The script fetches a crl from the ca and copies to a local dir or scp the crl to a webserver.
+
+# Set SYSCHECK_HOME if not already set.
+
+# 1. First check if SYSCHECK_HOME is set then use that
+if [ "x${SYSCHECK_HOME}" = "x" ] ; then
+# 2. Check if /etc/syscheck.conf exists then source that (put SYSCHECK_HOME=/path/to/syscheck in ther)
+ if [ -e /etc/syscheck.conf ] ; then
+ source /etc/syscheck.conf
+ else
+# 3. last resort use default path
+ SYSCHECK_HOME="/usr/local/syscheck"
+ fi
+fi
+
+if [ ! -f ${SYSCHECK_HOME}/syscheck.sh ] ; then echo "$0: Can't find syscheck.sh in SYSCHECK_HOME ($SYSCHECK_HOME)" ;exit ; fi
+
+# source env vars from system that dont get included when running from cron
+
+
+
+# Import common resources
+. $SYSCHECK_HOME/config/related-scripts.conf
+
+
+## local definitions ##
+SCRIPTID=927
+getlangfiles $SCRIPTID
+getconfig $SCRIPTID
+
+ERRNO_1=${SCRIPTID}1
+ERRNO_2=${SCRIPTID}2
+ERRNO_3=${SCRIPTID}3
+
+
+if [ "x$1" = "x--help" -o "x$1" = "x-h" ] ; then
+ echo $HELP
+ echo "$ERRNO_1/$DESCR_1 - $HELP_1"
+ echo "$ERRNO_2/$DESCR_2 - $HELP_2"
+ echo "$0 <-s|--screen>"
+ exit
+elif [ "x$1" = "x-s" -o "x$1" = "x--screen" ] ; then
+ PRINTTOSCREEN=1
+fi
+
+
+
+printtoscreen "${EJBCA_HOME}/bin/ejbca.sh ca createcrl"
+CMD=$(${EJBCA_HOME}/bin/ejbca.sh ca createcrl 2>&1)
+RES=$(echo "$CMD" | grep "CRLs have been created.")
+if [ "x$RES" = "x" ] ; then
+ printlogmess $ERROR $ERRNO_2 "$DESCR_2" "$CMD"
+else
+ printlogmess $INFO $ERRNO_1 "$DESCR_1" "$CMD"
+fi
+printtoscreen $CMD
+
Property changes on: trunk/syscheck/related-available/927_create_crls.sh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|