From 08b27a7a45c6fa96c5a3040d1d40f229975036f7 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Fri, 18 Aug 2017 10:22:13 +0100 Subject: fixed scripts --- tools/boca-fixssh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tools/boca-fixssh (limited to 'tools/boca-fixssh') 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 -- cgit v1.2.3