17 lines
209 B
Plaintext
17 lines
209 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
function stop() {
|
||
|
echo "Stopping"
|
||
|
exit 0
|
||
|
}
|
||
|
|
||
|
while true; do
|
||
|
echo "Starting $1"
|
||
|
trap - SIGINT
|
||
|
$@
|
||
|
trap stop SIGINT
|
||
|
echo -e "\nPress enter to restart $1..."
|
||
|
read
|
||
|
done
|
||
|
|