cert-enroll: Preventing some errors that might occur

This commit is contained in:
Andreas Steffen
2023-11-13 11:57:51 +01:00
committed by Tobias Brunner
parent f328ef0e04
commit 28ccdff692
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -37,12 +37,12 @@ cat $HOSTKEY $HOSTCERT > /etc/lighttpd/https-cert.pem
############################################################################## ##############################################################################
# Restart the lighttpd daemon # 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=$? grep -q "lighttpd.service enabled" && status=$? || status=$?
if [ $status -eq 0 ] if [ $status -eq 0 ]
then then
/usr/bin/systemctl restart lighttpd.service /usr/bin/systemctl restart lighttpd.service
else else
/etc/init.d/lighttpd restart /etc/init.d/lighttpd reload
fi fi
exit 0 exit 0
+1 -1
View File
@@ -55,7 +55,7 @@ then
cp old/$SUBCA $OPENXPKI_TLS/chain/$OLDSUBCA cp old/$SUBCA $OPENXPKI_TLS/chain/$OLDSUBCA
fi fi
rm $OPENXPKI_TLS/chain/*.0 rm -f $OPENXPKI_TLS/chain/*.0
/usr/bin/openssl rehash $OPENXPKI_TLS/chain /usr/bin/openssl rehash $OPENXPKI_TLS/chain
+1 -1
View File
@@ -54,7 +54,7 @@ then
cp old/$SUBCA $LDAP_TLS_CACERTDIR/$OLDSUBCA cp old/$SUBCA $LDAP_TLS_CACERTDIR/$OLDSUBCA
fi fi
rm $LDAP_TLS_CACERTDIR/*.0 rm -f $LDAP_TLS_CACERTDIR/*.0
/usr/bin/openssl rehash $LDAP_TLS_CACERTDIR /usr/bin/openssl rehash $LDAP_TLS_CACERTDIR