summaryrefslogtreecommitdiff
path: root/service.sh
diff options
context:
space:
mode:
authorJulian Blake Kongslie2020-05-24 23:02:20 -0700
committerJulian Blake Kongslie2020-05-24 23:55:52 -0700
commit2379a457a87afc9507f0f2a9664fcb47006a2aa2 (patch)
treeb2911f06721ce3b2cca269af3b2782747478f527 /service.sh
parentInitial commit. (diff)
downloadmagisk-ssh-main.tar.xz
Saner environment in SSH sessions, and automatically restart sshd.HEADmain
Diffstat (limited to 'service.sh')
-rwxr-xr-xservice.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/service.sh b/service.sh
index 2f4b72b..96093ba 100755
--- a/service.sh
+++ b/service.sh
@@ -2,12 +2,10 @@
2 2
3set -eux 3set -eux
4 4
5MODDIR="${0%/*}" 5export MODDIR="${0%/*}"
6 6
7until [ $(getprop sys.boot_completed) ]; do 7until [ $(getprop sys.boot_completed) ]; do
8 sleep 1 8 sleep 1
9done 9done
10 10
11SSHD="$(which sshd)" 11"$MODDIR"/ssh/run
12
13nohup "$SSHD" -f "$MODDIR"/ssh/sshd_config -h "$MODDIR"/ssh/ssh_host_rsa_key -o "AuthorizedKeysFile $MODDIR/ssh/authorized_keys" > /dev/null &