First create the .ssh directory if it doesn't exist.

pull/48/head
clewsy 2023-08-21 14:11:25 +10:00
parent 9ee23159b9
commit 58521cb1c0
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ CONF=/tmp/autossh.form
function start {
autossh_host=$(uci show autossh.@autossh[0].ssh | awk '{print $7}' | sed 's/@/ /g' | awk '{print $2}')
touch /root/.ssh/known_hosts
mkdir -p /root.ssh && touch /root/.ssh/known_hosts
if grep $autossh_host /root/.ssh/known_hosts; then
/etc/init.d/autossh start
else