diff options
| author | Julian Blake Kongslie | 2020-05-23 20:04:45 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2020-05-23 22:39:54 -0700 |
| commit | bcc5f7eb90feccd1e4b1d2058ea5205bcccf450c (patch) | |
| tree | a519bb8efbebee1f065d902de18af406183176b6 /service.sh | |
| download | magisk-ssh-bcc5f7eb90feccd1e4b1d2058ea5205bcccf450c.tar.xz | |
Initial commit.
Diffstat (limited to '')
| -rwxr-xr-x | service.sh | 13 |
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 | |||
| 3 | set -eux | ||
| 4 | |||
| 5 | MODDIR="${0%/*}" | ||
| 6 | |||
| 7 | until [ $(getprop sys.boot_completed) ]; do | ||
| 8 | sleep 1 | ||
| 9 | done | ||
| 10 | |||
| 11 | SSHD="$(which sshd)" | ||
| 12 | |||
| 13 | nohup "$SSHD" -f "$MODDIR"/ssh/sshd_config -h "$MODDIR"/ssh/ssh_host_rsa_key -o "AuthorizedKeysFile $MODDIR/ssh/authorized_keys" > /dev/null & | ||
