cert-enroll: Preventing some errors that might occur
This commit is contained in:
committed by
Tobias Brunner
parent
f328ef0e04
commit
28ccdff692
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user