diff options
Diffstat (limited to 'tools/boca-fixssh')
| -rw-r--r-- | tools/boca-fixssh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/boca-fixssh b/tools/boca-fixssh new file mode 100644 index 0000000..f6306ec --- /dev/null +++ b/tools/boca-fixssh @@ -0,0 +1,15 @@ +#!/bin/bash +if [ "`id bocassh 2>/dev/null`" != "" ]; then + if [ ! -d /var/www/boca/home/.ssh ]; then + mkdir -p /var/www/boca/home/.ssh + chown -R bocassh.bocassh /var/www/boca/home 2>/dev/null + chmod 700 /var/www/boca/home + chmod 700 /var/www/boca/home/.ssh + fi + for i in 1 2 3 4 5; do + touch /var/www/boca/home/.ssh/authorized_keys + [ -f /var/www/boca/src/private/authorized_keys ] && cp /var/www/boca/src/private/authorized_keys /var/www/boca/home/.ssh/authorized_keys + chmod 600 /var/www/boca/home/.ssh/authorized_keys + sleep 10 + done +fi |