blob: b1fe1343269bba1f2cb7d3715974442e2c0acef9 [file] [log] [blame]
#!/usr/bin/env bash
NAME=`basename $1`
PIDFILE="/var/run/$NAME.pid"
PID=$$
echo "$PID" > $PIDFILE
trap "{ rm -f $PIDFILE ; kill 0; }" EXIT
while true;
do
echo "Restarting not dealing well with spaces.."
(exec $*) || true
sleep 10s
done