From: Martin Mares Date: Sun, 1 Jul 2007 18:12:30 +0000 (+0200) Subject: Added a script for installing of certificates. X-Git-Tag: python-dummy-working~323 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=8793802343bfbefa10fa14f5bd0acf34ce7173d0;p=moe.git Added a script for installing of certificates. --- diff --git a/submit/install-certs b/submit/install-certs new file mode 100755 index 0000000..6498e81 --- /dev/null +++ b/submit/install-certs @@ -0,0 +1,13 @@ +#!/bin/bash +set -e +while IFS=" " read LOGIN FULL MACH ; do + if [ -z "$1" -o "$1" == "$LOGIN" ] ; then + echo "$LOGIN -> $MACH" + D=/mo/users/$LOGIN/$LOGIN/ + ssh root@$MACH "cd $D && rm -rf .mo && mkdir .mo" + scp certs/$LOGIN-cert.pem root@$MACH:$D/.mo/cert.pem + scp certs/$LOGIN-key.pem root@$MACH:$D/.mo/key.pem + scp certs/ca-cert.pem root@$MACH:$D/.mo/ca-cert.pem + ssh root@$MACH "cd $D && chmod 600 .mo/key.pem && chown $LOGIN.$LOGIN .mo -R" + fi