summaryrefslogtreecommitdiff
path: root/service.sh
diff options
context:
space:
mode:
authorJulian Blake Kongslie2020-05-23 20:04:45 -0700
committerJulian Blake Kongslie2020-05-23 22:39:54 -0700
commitbcc5f7eb90feccd1e4b1d2058ea5205bcccf450c (patch)
treea519bb8efbebee1f065d902de18af406183176b6 /service.sh
downloadmagisk-ssh-bcc5f7eb90feccd1e4b1d2058ea5205bcccf450c.tar.xz
Initial commit.
Diffstat (limited to 'service.sh')
-rwxr-xr-xservice.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/service.sh b/service.sh
new file mode 100755
index 0000000..2f4b72b
--- /dev/null
+++ b/service.sh
@@ -0,0 +1,13 @@
1#!/system/bin/sh
2
3set -eux
4
5MODDIR="${0%/*}"
6
7until [ $(getprop sys.boot_completed) ]; do
8 sleep 1
9done
10
11SSHD="$(which sshd)"
12
13nohup "$SSHD" -f "$MODDIR"/ssh/sshd_config -h "$MODDIR"/ssh/ssh_host_rsa_key -o "AuthorizedKeysFile $MODDIR/ssh/authorized_keys" > /dev/null &