X-Git-Url: http://git.hcoop.net/hcoop/scripts.git/blobdiff_plain/e66e3495e0e9d166ea25d6b0673845ad89acb16f..25257feb3458908e8ef4c98533c341a76651f53a:/ca-install diff --git a/ca-install b/ca-install index 14e66fc..416cc0d 100755 --- a/ca-install +++ b/ca-install @@ -31,7 +31,7 @@ else KEY=$4 fi -WEBSERVER=navajos.hcoop.net +WEBSERVERS="shelob.hcoop.net" function verify_cert () { if test -z "$2" || test -n "$3"; then @@ -57,8 +57,8 @@ function verify_cert () { } # Make sure we run this from an admin host... -if test "$(hostname -s)" != "fritz"; then - echo "Error: This script must be run from fritz." +if test "$(hostname -s)" != "gibran"; then + echo "Error: This script must be run from gibran." exit 1 fi @@ -124,12 +124,18 @@ echo # 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 @@ -138,7 +144,9 @@ domtool-admin grant $MEMBER cert "$APACHE_DEST" 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