From 2379a457a87afc9507f0f2a9664fcb47006a2aa2 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 24 May 2020 23:02:20 -0700 Subject: Saner environment in SSH sessions, and automatically restart sshd. --- service.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'service.sh') diff --git a/service.sh b/service.sh index 2f4b72b..96093ba 100755 --- a/service.sh +++ b/service.sh @@ -2,12 +2,10 @@ set -eux -MODDIR="${0%/*}" +export MODDIR="${0%/*}" until [ $(getprop sys.boot_completed) ]; do sleep 1 done -SSHD="$(which sshd)" - -nohup "$SSHD" -f "$MODDIR"/ssh/sshd_config -h "$MODDIR"/ssh/ssh_host_rsa_key -o "AuthorizedKeysFile $MODDIR/ssh/authorized_keys" > /dev/null & +"$MODDIR"/ssh/run -- cgit v1.2.3