linux-utils/restart-on-change

9 lines
114 B
Text
Raw Permalink Normal View History

#!/bin/sh
while true; do
$@ &
PID=$!
sleep 1
inotifywait $1 # FIXME: that's not the file
kill $PID
done