cert-enroll: Preventing some errors that might occur

This commit is contained in:
Andreas Steffen 2023-11-12 10:22:38 +01:00 committed by Tobias Brunner
parent f328ef0e04
commit 28ccdff692
3 changed files with 4 additions and 4 deletions

View File

@ -37,12 +37,12 @@ cat $HOSTKEY $HOSTCERT > /etc/lighttpd/https-cert.pem
##############################################################################
# Restart the lighttpd daemon
#
systemctl list-unit-files lighttpd.service | \
test -f /usr/bin/systemctl && /usr/bin/systemctl list-unit-files lighttpd.service | \
grep -q "lighttpd.service enabled" && status=$? || status=$?
if [ $status -eq 0 ]
then
/usr/bin/systemctl restart lighttpd.service
else
/etc/init.d/lighttpd restart
/etc/init.d/lighttpd reload
fi
exit 0

View File

@ -55,7 +55,7 @@ then
cp old/$SUBCA $OPENXPKI_TLS/chain/$OLDSUBCA
fi
rm $OPENXPKI_TLS/chain/*.0
rm -f $OPENXPKI_TLS/chain/*.0
/usr/bin/openssl rehash $OPENXPKI_TLS/chain

View File

@ -54,7 +54,7 @@ then
cp old/$SUBCA $LDAP_TLS_CACERTDIR/$OLDSUBCA
fi
rm $LDAP_TLS_CACERTDIR/*.0
rm -f $LDAP_TLS_CACERTDIR/*.0
/usr/bin/openssl rehash $LDAP_TLS_CACERTDIR