2023-06-29 22:14:05 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
AUTOSSH_ENABLED=$(get-ini /boot/kioskbrowser.ini autossh enabled)
|
|
|
|
if [ "${AUTOSSH_ENABLED}" -eq 1 ]
|
|
|
|
then
|
2023-06-30 10:55:10 +02:00
|
|
|
if [ -f "/boot/id_rsa" ]; then
|
|
|
|
cp /boot/id_rsa /root/.ssh/id_rsa
|
|
|
|
AUTOSSH_KEYPATH="-i /root/.ssh/id_rsa"
|
|
|
|
fi
|
|
|
|
if [ -f "/boot/id_ed25519" ]; then
|
|
|
|
cp /boot/id_ed25519 /root/.ssh/id_ed25519
|
|
|
|
AUTOSSH_KEYPATH="-i /root/.ssh/id_ed25519"
|
|
|
|
fi
|
|
|
|
chown -hR root:root /root/.ssh
|
|
|
|
chmod -R 700 /root/.ssh
|
|
|
|
|
2023-06-29 22:14:05 +02:00
|
|
|
AUTOSSH_ARGS=$(get-ini /boot/kioskbrowser.ini autossh args)
|
|
|
|
export AUTOSSH_GATETIME=0
|
2023-06-30 10:55:10 +02:00
|
|
|
/usr/bin/autossh -N -q -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" ${AUTOSSH_KEYPATH} ${AUTOSSH_ARGS}
|
2023-06-29 22:14:05 +02:00
|
|
|
fi
|
|
|
|
|