linux-utils/restart-on-change

8 lines
75 B
Plaintext
Raw Normal View History

#!/bin/sh
while true; do
$@ &
PID=$!
inotifywait $1
kill $PID
done