Page 1 of 1

Pr server not start in centos linux

Posted: 2016-03-11 18:28
by rebane24
Image

was useing this setup
https://www.realitymod.com/forum/f109-p ... linux.html

server start up script is that
#! /bin/sh
DAM=$(exec date +%H:%M:%S)
DAY=$(exec date +%D)
echo "[$DAY $DAM] Bf2 Server Starting" >> restarts.log
echo To stop the restarting press Ctrl+C when the server is being restarted
echo
DAM=$(exec date +%H:%M:%S)
DAY=$(exec date +%D)
trap 'echo; echo [$DAY $DAM] $SRV Server Restarter has been STOPPED! >> restarts.log; exit 1' 2
C1=0
while true
do
C1=$((C1+=1))
# Modify the line bellow to match your server execution command line
./start_pr.sh +modPath mods/pr
DAM=$(exec date +%H:%M:%S)
DAY=$(exec date +%D)
echo "[$DAY $DAM] PR server restarted $C1 time(s)!" >> restarts.log
sleep 10
done

ANY IDEA?

Re: Pr server not start in centos linux

Posted: 2016-03-11 20:35
by rebane24
new error
Image

Re: Pr server not start in centos linux

Posted: 2016-03-11 21:34
by rebane24
That kind error i have!
-bash-4.1$ ./start_pr.sh
-bash: ./start_pr.sh: /bin/sh^M: bad interpreter: No such file or directory.
what i do ?

Re: Pr server not start in centos linux

Posted: 2016-03-12 00:17
by moozery

Code: Select all

#! /bin/sh
DAM=$(exec date +%H:%M:%S)
DAY=$(exec date +%D)
echo "[$DAY $DAM] Bf2 Server Starting" >> restarts.log
echo To stop the restarting press Ctrl+C when the server is being restarted
echo
DAM=$(exec date +%H:%M:%S)
DAY=$(exec date +%D)
trap 'echo; echo [$DAY $DAM] $SRV Server Restarter has been STOPPED! >> restarts.log; exit 1' 2
C1=0
while true
do
C1=$((C1+=1))
# Modify the line bellow to match your server execution command line
./start[color=Red][b]_pr[/b][/color].sh +modPath mods/pr
DAM=$(exec date +%H:%M:%S)
DAY=$(exec date +%D)
echo "[$DAY $DAM] PR server restarted $C1 time(s)!" >> restarts.log
sleep 10
done
Try removing the red part, so that it's just "./start.sh" instead of "./start_pr.sh"