File: xlassie-remote-loop

package info (click to toggle)
xlassie 1.8-21
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 308 kB
  • ctags: 214
  • sloc: ansic: 1,873; makefile: 49; sh: 18
file content (15 lines) | stat: -rwxr-xr-x 345 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh -f
if [ $# = 0 -o x$1 = x-h ]; then
    p=$(basename $0)
    echo "Usage: $p host [remote xlassie options]"
    echo " runs xlassie on remote host via ssh, restarting upon exit"
    exit 1
fi
h=$1
shift
while true; do
    ssh -n -X ${h} xlassie "$@"
    echo -n "remote xlassie terminated ..."
    sleep 10
    echo " restarting"
done