mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
openssh: rework init script
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
78f45423e5
commit
de28c2e71f
@ -22,8 +22,17 @@
|
|||||||
#
|
#
|
||||||
# runlevels: openelec, textmode
|
# runlevels: openelec, textmode
|
||||||
|
|
||||||
if [ -f /storage/.cache/openelec/sshd.conf ]; then
|
if [ -f /etc/sshd.conf ]; then
|
||||||
. /storage/.cache/openelec/sshd.conf
|
. /etc/sshd.conf
|
||||||
|
elif [ -f /storage/.config/sshd.conf ]; then
|
||||||
|
. /storage/.config/sshd.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if password authentication is disabled
|
||||||
|
OPTIONS=""
|
||||||
|
|
||||||
|
if [ "$SSHD_DISABLE_PW_AUTH" == "true" ] ; then
|
||||||
|
OPTIONS="-o 'PasswordAuthentication no'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RSA1_KEY="/storage/.cache/ssh/ssh_host_key"
|
RSA1_KEY="/storage/.cache/ssh/ssh_host_key"
|
||||||
@ -36,11 +45,7 @@
|
|||||||
HOME="/storage"
|
HOME="/storage"
|
||||||
|
|
||||||
(
|
(
|
||||||
if [ -f /etc/ssh.conf ]; then
|
if [ "$SSH" = "yes" -o "$SSHD_START" = "true" ]; then
|
||||||
. /etc/ssh.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$SSH" = yes -o -f /storage/.config/ssh_enable -o "$SSHD_START" == "true" ]; then
|
|
||||||
|
|
||||||
# Check for the SSH1 RSA key
|
# Check for the SSH1 RSA key
|
||||||
if [ ! -s $RSA1_KEY ] ; then
|
if [ ! -s $RSA1_KEY ] ; then
|
||||||
@ -81,12 +86,6 @@
|
|||||||
cp /etc/ssh/known_hosts $HOME/.ssh
|
cp /etc/ssh/known_hosts $HOME/.ssh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if password authentication is disabled
|
|
||||||
OPTIONS=""
|
|
||||||
|
|
||||||
if [ "$SSHD_DISABLE_PW_AUTH" == "true" ] ; then
|
|
||||||
OPTIONS="-o 'PasswordAuthentication no'"
|
|
||||||
fi
|
|
||||||
progress "Starting SSH Server"
|
progress "Starting SSH Server"
|
||||||
|
|
||||||
mkdir -p /var/empty
|
mkdir -p /var/empty
|
||||||
|
Loading…
x
Reference in New Issue
Block a user