Ето ти частта от скрипта, която отговаря на това, което си написал:
Код:
...
run() {
# Runs the steam update and server
# Loops if RESTART is set
# Debugs if server failure is detected
# Note: if RESTART is not set then
# 1. DEBUG is set then the server is NOT exec'd
# 2. DEBUG is not set the the server is exec'd
if test -n "$RESTART" ; then
echo "Auto-restarting the server on crash"
#loop forever
while true
do
# Update if needed
update
# Run the server
$HL_CMD
retval=$?
if test $retval -eq 0 && test -z "$AUTO_UPDATE"; then
break; # if 0 is returned then just quit
fi
debugcore $retval
echo "`date`: Server restart in $TIMEOUT seconds"
# don't thrash the hard disk if the server dies, wait a little
sleep $TIMEOUT
done # while true
...
Тук ясно се вижда, че ако $RESTART е сетната (а тя по подразбиране е сетната на "yes") ще цикли безкрайно и ще рестартира сървъра при спиране/крашване.
Вариантите са ти няколко, ето 2 от тях:
1. Убий правилните процеси (пр. 1. скрипта, който цикли, 2. сървъра)
2. Използвай флаг на командния ред "-norestart"
И най - важното не си прави заключения без да разбираш причината.
Поздрави