Compare commits

...

1 Commits

Author SHA1 Message Date
Miłosz Stocki 5b029a2cf8
added missing file 2020-03-04 21:02:49 +01:00
1 changed files with 24 additions and 0 deletions

24
entrypoint.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
#dpkg-reconfigure openssh-server
if [ -n "${BORG_UID}" ]; then
usermod -u ${BORG_UID} borg
fi
if [ -n "${BORG_GID}" ]; then
groupmod -o -g ${BORG_GID} borg
usermod -g ${BORG_GID} borg
fi
if [ ! -z ${BORG_AUTHORIZED_KEYS+x} ]; then
mkdir /home/borg/.ssh
echo -e $BORG_AUTHORIZED_KEYS > /home/borg/.ssh/authorized_keys
chown borg.borg /home/borg/.ssh/authorized_keys
chmod og-rwx /home/borg/.ssh/authorized_keys
fi
chown -R borg.borg /home/borg
chown -R borg.borg /home/borg/.ssh
exec /usr/sbin/sshd -D -e