KEY=$4
fi
-WEBSERVER=navajos.hcoop.net
+WEBSERVERS="shelob.hcoop.net"
function verify_cert () {
if test -z "$2" || test -n "$3"; then
}
# Make sure we run this from an admin host...
-if test "$(hostname -s)" != "fritz"; then
+if test "$(hostname -s)" != "gibran"; then
echo "Error: This script must be run from fritz."
exit 1
fi
# Copy complete certificate to webserver
if test -z "$KEY"; then
echo "Installing certificate to Apache SSL directory ..."
- < "$CERT" ssh $WEBSERVER sudo tee "$APACHE_DEST" > /dev/null
+ for WEBSERVER in $WEBSERVERS; do
+ < "$CERT" ssh $WEBSERVER sudo tee "$APACHE_DEST" > /dev/null
+ done
else
echo "Installing certificate and key to Apache SSL directory ..."
- cat "$CERT" "$KEY" | ssh $WEBSERVER sudo tee "$APACHE_DEST" > /dev/null
+ for WEBSERVER in $WEBSERVERS; do
+ cat "$CERT" "$KEY" | ssh $WEBSERVER sudo tee "$APACHE_DEST" > /dev/null
+ done
fi
-ssh $WEBSERVER sudo chmod 400 "$APACHE_DEST" > /dev/null
+for WEBSERVER in $WEBSERVERS; do
+ ssh $WEBSERVER sudo chmod 400 "$APACHE_DEST" > /dev/null
+done
echo
# Grant Domtool permissions
echo
echo "Restarting apache ..."
-ssh $WEBSERVER sudo apache2ctl restart
+for WEBSERVER in $WEBSERVERS; do
+ ssh $WEBSERVER sudo apache2ctl graceful
+done
echo
# Tell admin what to do