Das RaspBMC auf upstart scripts setzt habe ich folgendes erstellt:
Code: Alles auswählen
# autossh
description "autossh connections"
start on started dbus
stop on (runlevel [06] or stopped dbus)
respawn
respawn limit 5 60 # respawn max 5 times in 60 seconds
script
export AUTOSSH_PIDFILE=/var/run/autossh.pid
export AUTOSSH_POLL=60
export AUTOSSH_FIRST_POLL=30
export AUTOSSH_GATETIME=0
export AUTOSSH_DEBUG=1
exec sudo -H -u pi -s autossh -M 0 -R remoteport:127.0.0.1:localport remoteuser@remote.host
exec sudo -H -u pi -s autossh -M 0 -R remoteport2:127.0.0.1:localport2 remoteuser@remote.host
end script
Ohne upstart script funktioniert der gleiche Befehl (ohne exec) wunderbar.ssh exited prematurely with status 0
Wo liegt das Problem und wie kann ich es lösen, danke!