+++ /dev/null
-#!/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 </dev/null
-done <userlist