File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 text = ''
2727 #!/bin/sh
2828 if ! pgrep -x "sshd" > /dev/null; then
29- SSHD_BIN="/data/data/com.termux/files/usr/bin/sshd"
30- if [ ! -x "$SSHD_BIN" ]; then
31- SSHD_BIN="${ pkgs . openssh } /bin/sshd"
29+ if command -v proot > /dev/null 2>&1; then
30+ proot -0 ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
31+ else
32+ ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
3233 fi
33- "$SSHD_BIN" -f ${ config . home . homeDirectory } /.ssh/sshd_config
3434 fi
3535 '' ;
3636 executable = true ;
Original file line number Diff line number Diff line change 2727 programs . zsh . initExtra = ''
2828 export PROMPT="%F{yellow}%n%f@%F{green}${ hostName } %f:%F{blue}%~%f%# "
2929 if ! pgrep -x "sshd" > /dev/null; then
30- SSHD_BIN="/data/data/com.termux/files/usr/bin/sshd"
31- if [ ! -x "$SSHD_BIN" ]; then
32- SSHD_BIN="${ pkgs . openssh } /bin/sshd"
30+ if command -v proot > /dev/null 2>&1; then
31+ proot -0 ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
32+ else
33+ ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
3334 fi
34- "$SSHD_BIN" -f ${ config . home . homeDirectory } /.ssh/sshd_config
3535 fi
3636 '' ;
3737
3838 programs . bash . initExtra = ''
3939 export PS1="\[\033[01;33m\]\u\[\033[00m\]@\[\033[01;32m\]${ hostName } \[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
4040 if ! pgrep -x "sshd" > /dev/null; then
41- SSHD_BIN="/data/data/com.termux/files/usr/bin/sshd"
42- if [ ! -x "$SSHD_BIN" ]; then
43- SSHD_BIN="${ pkgs . openssh } /bin/sshd"
41+ if command -v proot > /dev/null 2>&1; then
42+ proot -0 ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
43+ else
44+ ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
4445 fi
45- "$SSHD_BIN" -f ${ config . home . homeDirectory } /.ssh/sshd_config
4646 fi
4747 '' ;
4848}
Original file line number Diff line number Diff line change 2727 programs . zsh . initExtra = ''
2828 export PROMPT="%F{yellow}%n%f@%F{green}${ hostName } %f:%F{blue}%~%f%# "
2929 if ! pgrep -x "sshd" > /dev/null; then
30- SSHD_BIN="/data/data/com.termux/files/usr/bin/sshd"
31- if [ ! -x "$SSHD_BIN" ]; then
32- SSHD_BIN="${ pkgs . openssh } /bin/sshd"
30+ if command -v proot > /dev/null 2>&1; then
31+ proot -0 ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
32+ else
33+ ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
3334 fi
34- "$SSHD_BIN" -f ${ config . home . homeDirectory } /.ssh/sshd_config
3535 fi
3636 '' ;
3737
3838 programs . bash . initExtra = ''
3939 export PS1="\[\033[01;33m\]\u\[\033[00m\]@\[\033[01;32m\]${ hostName } \[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
4040 if ! pgrep -x "sshd" > /dev/null; then
41- SSHD_BIN="/data/data/com.termux/files/usr/bin/sshd"
42- if [ ! -x "$SSHD_BIN" ]; then
43- SSHD_BIN="${ pkgs . openssh } /bin/sshd"
41+ if command -v proot > /dev/null 2>&1; then
42+ proot -0 ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
43+ else
44+ ${ pkgs . openssh } /bin/sshd -f ${ config . home . homeDirectory } /.ssh/sshd_config
4445 fi
45- "$SSHD_BIN" -f ${ config . home . homeDirectory } /.ssh/sshd_config
4646 fi
4747 '' ;
4848}
You can’t perform that action at this time.
0 commit comments