summaryrefslogtreecommitdiffstats
path: root/apps/restart-on-term.sh
blob: 37bb4fa4391735ed967c02796197e822ab8b3d03 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# see http://superuser.com/questions/223449/auto-restart-process-on-crash
PROGRAM=$1

RC=1
while [ $RC -ne 0 ]; do
   ./${PROGRAM}
   RC=$?
done