summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/netpanzer/files/netpanzer-ded')
-rw-r--r--games-strategy/netpanzer/files/netpanzer-ded15
1 files changed, 15 insertions, 0 deletions
diff --git a/games-strategy/netpanzer/files/netpanzer-ded b/games-strategy/netpanzer/files/netpanzer-ded
new file mode 100644
index 000000000000..4d8128d15e84
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-ded
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+running=yes
+while [ $running = yes ]; do
+ /usr/games/bin/netpanzer --game_config=/etc/netpanzer-ded.ini -d $@
+ if [ $? -ge 128 ]; then
+ echo "`date`: Restarting server after crash"
+ # wait a bit to not blow cpu and logfiles on constant crashs
+ sleep 30
+ else
+ #normal exit
+ running=no
+ fi
+done
+