tunnel, keep the loop in the foreground so that the output makes it to the log.
This commit is contained in:
1 parent
bbffe8c69a
commit
f587ca1e5e
1 file changed
+1
-3
@@ -60,7 +60,6 @@
|
||||
exec 2>&1
|
||||
|
||||
# Health check to ensure connection does not go stale.
|
||||
(
|
||||
while true; do
|
||||
sleep 300
|
||||
echo -n "RUN-LOOP: "
|
||||
@@ -72,8 +71,7 @@
|
||||
sv restart {{ tunnel_service_name }}
|
||||
fi
|
||||
echo "RUN-LOOP: Going back to sleep."
|
||||
done
|
||||
) &
|
||||
done &
|
||||
|
||||
# Do not use `exec` here otherwise the loop may get killed.
|
||||
chpst -u {{ user }} ssh -v -N \
|
||||
|
||||
Reference in new issue
Block a user