Add support for config file

This commit is contained in:
Marko Korhonen 2024-05-09 12:19:31 +03:00
parent 368afcdfd9
commit b9e033da09
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
4 changed files with 21 additions and 4 deletions

View file

@ -4,8 +4,15 @@ run_hook() {
[ -d /dev/pts ] || mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
echo "Starting dropbear"
/usr/sbin/dropbear -E -s -j -k
if [ -s /etc/dropbear/config ]; then
echo "Found dropbear config file"
. /etc/dropbear/config
fi
port=${DROPBEAR_PORT:-22}
echo "Starting dropbear on port $port"
/usr/sbin/dropbear -E -s -j -k -p "$port"
}
run_cleanuphook() {