Skip to content

Commit a7be237

Browse files
committed
using supervisord
1 parent 1ba5d69 commit a7be237

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

start.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ fi
1919
if test -n "$SSHKEY"
2020
then
2121
mkdir -p $HOME/.ssh
22-
echo "$SSHKEY" >>$HOME/.ssh/authorized_keys
23-
chmod 600 ~/.ssh/authorized_keys
22+
if ! grep "$SSHKEY" $HOME/.ssh/authorized_keys
23+
then echo "$SSHKEY" >>$HOME/.ssh/authorized_keys
24+
fi
25+
chmod 600 $HOME/.ssh/authorized_keys
26+
chmod 700 $HOME/.ssh
2427
fi
2528

2629
# fix permissions

supervisord.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pidfile=/tmp/supervisord.pid
66
user=root
77

88
[program:sshd]
9-
command=/usr/sbin/sshd -p 2222 -D
9+
command=/usr/sbin/sshd -p 2222 -D -e
1010
directory=/
1111
user=root
1212
autostart=true

0 commit comments

Comments
 (0)