#!/bin/bash # # Press Ctrl+C to stop the restarting echo "##########################" echo "# Bf2 Server Starting #" echo "##########################" echo To stop the restarting press Ctrl+C when the server is being restarted echo trap 'echo; echo $SRV Server Restarter has been STOPPED!; exit 1' 2 C1=0 while true do C1=$((C1+=1)) cd /home/bf2srv/bf2 # Modify the line below to match your server execution command line ./start.sh echo "Bf2 server restarted $C1 time(s)!" sleep 10 done
None




