Moved the copying of the ATS Signing Certificate to the init.d script

because the CasaAuthTokenSvc webapp folder is not created until after
Tomcat is started.
This commit is contained in:
Juan Carlos Luciani
2007-06-01 17:56:42 +00:00
parent ef99031e7e
commit 718b0fda28
3 changed files with 27 additions and 4 deletions

View File

@@ -115,6 +115,24 @@ StartDAEMON()
sleep 1
if atsIsRunning ; then
rc_failed 0
# Check if we need to copy the Signing Certificate to the webapp folder
if [ ! -f /srv/www/casaats/webapps/CasaAuthTokenSvc/SigningCert ]; then
# Wait a max of 60 seconds for the webapp folder to be created
wait_sec=60
while [ "$wait_sec" != "0" ] ; do
sleep 1
if [ -d /srv/www/casaats/webapps/CasaAuthTokenSvc ]; then
# The folder was created, end the loop
wait_sec=0
break
fi
wait_sec=$((wait_sec -1))
done
# Copy the signing certificate to the webapps folder so that it can be downloaded from the ATS
cp /etc/CASA/authtoken/keys/localSigningCert /srv/www/casaats/webapps/CasaAuthTokenSvc/SigningCert
fi
else
rc_failed 7
fi
@@ -136,7 +154,7 @@ StopDAEMON()
while [ "$wait_sec" != "0" ] ; do
sleep 1
if ! atsIsRunning ; then
# the server is stoped, end the loop
# the server is stopped, end the loop
wait_sec=0
break
fi