success with the passwords
This commit is contained in:
parent
254be9abef
commit
c8f718c327
@ -35,9 +35,9 @@ function dbg () {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
FORKSTART )
|
FORKSTART )
|
||||||
echo -n $$ > "$BASEDIR/var/${2}.connected"
|
echo -n $$ > "$BASEDIR/var/${2}.connected"
|
||||||
if [[ grep -c "^$2" $PWCONF ]]; then
|
if [[ $(grep -c "^$2" $PWCONF) -gt 0 ]]; then
|
||||||
pass=$(awk "/^$2/ {print \$2}" ${PWCONF})
|
pass=$(awk "/^$2/ {print \$2}" ${PWCONF}) # password needed
|
||||||
screen -d -m -S "tk${2}" "$0 FORKSCREEN $2"
|
screen -d -m -S "tk${2}" $0 FORKSCREEN $2
|
||||||
while [[ -e "$BASEDIR/var/${2}.connected" ]]; do
|
while [[ -e "$BASEDIR/var/${2}.connected" ]]; do
|
||||||
sleep 5
|
sleep 5
|
||||||
if [[ -f "$BASEDIR/var/${2}.screen" ]]; then
|
if [[ -f "$BASEDIR/var/${2}.screen" ]]; then
|
||||||
@ -46,9 +46,8 @@ case "$1" in
|
|||||||
rm -f "$BASEDIR/var/${2}.screen"
|
rm -f "$BASEDIR/var/${2}.screen"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else # passwordless auth
|
||||||
while [[ -e "$BASEDIR/var/${2}.connected" ]]; do
|
while [[ -e "$BASEDIR/var/${2}.connected" ]]; do
|
||||||
# passwordless auth
|
|
||||||
ssh -F "${SSHCONF}" $dbgopt -N $2 2>&1 | dbg
|
ssh -F "${SSHCONF}" $dbgopt -N $2 2>&1 | dbg
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user