]> mj.ucw.cz Git - moe.git/blob - submit/install-certs
Use `char *' for all strings instead of `byte *'.
[moe.git] / submit / install-certs
1 #!/bin/bash
2 set -e
3 while IFS="     " read LOGIN FULL MACH ; do
4         if [ -z "$1" -o "$1" == "$LOGIN" ] ; then
5                 echo "$LOGIN -> $MACH"
6                 D=/mo/users/$LOGIN/$LOGIN/
7                 ssh root@$MACH "cd $D && rm -rf .mo && mkdir .mo"
8                 scp certs/$LOGIN-cert.pem root@$MACH:$D/.mo/cert.pem
9                 scp certs/$LOGIN-key.pem root@$MACH:$D/.mo/key.pem
10                 scp certs/ca-cert.pem root@$MACH:$D/.mo/ca-cert.pem
11                 ssh root@$MACH "cd $D && chmod 600 .mo/key.pem && chown $LOGIN.$LOGIN .mo -R"
12         fi </dev/null
13 done <userlist