linux-utils/restart-on-change

7 lines
75 B
Bash
Executable file

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