Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
#!/bin/sh

# CRL_cleanup

atdrunning=no
(/usr/sbin/service status atd.service | grep "(running) since") && atdrunning=yes

if [ "${atdrunning}" = "yes" ]
then
    /usr/sbin/service stop atd.service
fi

hostname=$(hostname -f)

echo | /var/install/bin/certs-update-crl --deletejobs
echo

cd /var/certs/ssl/crl

crls=$(ls)
for f in ${crls}
do
    if echo ${f} | grep -vq "^${hostname}"
    then
        rm ${f}
    fi
done

cd ..

cp certs-update-crl-list.std certs-update-crl-list

echo | /var/install/bin/certs-update-crl --all
echo

if [ "${atdrunning}" = "yes" ]
then
    /usr/sbin/service start atd.service
fi

...