linux-utils/restart-on-change

9 lines
114 B
Plaintext
Raw Permalink Normal View History

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