From 8793802343bfbefa10fa14f5bd0acf34ce7173d0 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 1 Jul 2007 20:12:30 +0200 Subject: [PATCH] Added a script for installing of certificates. --- submit/install-certs | 13 ++++++++ userlist | 70 ++++++++++++++++++++++---------------------- 2 files changed, 48 insertions(+), 35 deletions(-) create mode 100755 submit/install-certs 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