echo
# Determine whether we need to concatenate a private key
-if grep "^-----BEGIN RSA PRIVATE KEY-----" "$CERT" > /dev/null; then
+if grep "^-----BEGIN PRIVATE KEY-----" "$CERT" > /dev/null; then
KEY=
else
if test -z "$KEY"; then
else
echo "Installing certificate and key to Apache SSL directory ..."
cat "$CERT" "$KEY" | ssh $WEBSERVER sudo tee "$APACHE_DEST" > /dev/null
+ ssh $WEBSERVER sudo chmod 400 "$APACHE_DEST" > /dev/null
fi
echo
domtool-admin grant $MEMBER cert "$APACHE_DEST"
echo
+echo "Restarting apache ..."
+ssh $WEBSERVER sudo apache2ctl restart
+echo
+
# Tell admin what to do
echo "Done. Tell $MEMBER that the certificate is available for use at"
echo " $APACHE_DEST"