linux-utils/restart-on-change

8 lines
114 B
Bash
Executable file

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