linux-utils/restart-on-change

8 lines
75 B
Bash
Executable file

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