DeanReid Posted December 28, 2014 Report Share Posted December 28, 2014 Correct :) If you get the "Can't find Binary" problem then this should fix it cd / && /home/dayzservers/epochchernarus/restarter.pl Changing the location to your files though :) Link to comment Share on other sites More sharing options...
Mochan Posted January 4, 2015 Report Share Posted January 4, 2015 Correct :) If you get the "Can't find Binary" problem then this should fix it cd / && /home/dayzservers/epochchernarus/restarter.pl Changing the location to your files though :) I've been trying to get this working for a few days now? Don't suppose you could come on teamspeak and help me sort this out please?! Link to comment Share on other sites More sharing options...
jahangir13 Posted January 4, 2015 Report Share Posted January 4, 2015 It's not so difficult. You execute the script restarter.pl at specific times given via linux cron job. Therefore you open the cron editor with crontab -e (for my debian...maybe it's different for your distribution but it's easy to figure out with a search engine). After executing crontab -e you see a text file with something like this: # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command m = minute, h = hour, dom = dayOfMonth, mon = month, dow = dayOfWeek, and command is the command to execute For my restarter.pl I have this line in my crontab: 0 */4 * * * /home/epoch/server/restarter.pl >> /home/epoch/server/restart.log 2>&1 ...which means: excute the script at the zero minute of the hour (0), all 4 hours (*/4). * * * means every day. I execute /home/epoch/server/restarter.pl as the command as this is the place where my restarter.pl is located. The rest (>> /home/epoch/server/restart.log 2>&1) is not needed...it just logs all messages (if there is output in restarter.pl) and errors the command outputs to a file restarter.log. CTRL-O writes the changed file, CTRL-X leaves the crontab editor and you will see a message that your changes are now scheduled or something similar. You need to decide when you want to execute restarter.pl and how often and edit the line accordingly. That should be all. I use an absolute path in the config section at the beginning of my restarter.pl so that cron finds the binary as cron does not execute the script (restarter.pl) from your server directory...but I guess from the server users home directory: use constant PATH => '/home/epoch/server/'; Of course you need to change the path to your settings in restarter.pl and the cron line above. Link to comment Share on other sites More sharing options...
DeanReid Posted January 4, 2015 Report Share Posted January 4, 2015 If you still need help after Jahangir's post then send me a pm and I'll give you a hand :) Link to comment Share on other sites More sharing options...
wardevour Posted January 9, 2015 Report Share Posted January 9, 2015 i keep getting Got Socket! Attempting Login and then it hangs. any suggestions? Link to comment Share on other sites More sharing options...
wardevour Posted January 9, 2015 Report Share Posted January 9, 2015 doesn't make sense. the arma server isnt binding to the port, yet my friends and i can all join and play. a port check tool says the ports not open and battleye rcon cant connect either. the ports are definitely forwarded. BattlEye Server: Initialized (v1.195) BTW Link to comment Share on other sites More sharing options...
wardevour Posted January 9, 2015 Report Share Posted January 9, 2015 is there no way to send commands directly to the sever? I cant seem to figure out the problem. I'm assuming it has something to do with my m0n0wall router and there is not a whole lot i can do about that Link to comment Share on other sites More sharing options...
DeanReid Posted January 10, 2015 Report Share Posted January 10, 2015 Are you using 0.0.0.0 or the external ip in the config.php? Link to comment Share on other sites More sharing options...
wardevour Posted January 11, 2015 Report Share Posted January 11, 2015 Are you using 0.0.0.0 or the external ip in the config.php? i tried 127.0.0.1 and the external ip. ill try 0.0.0.0 EDIT: same deal with 0.0.0.0 testing with php ./resinf.php BTW tried netstat -lnptu udp 0 0 0.0.0.0:27015 0.0.0.0:* 7060/epoch udp 0 0 0.0.0.0:27016 0.0.0.0:* 7060/epoch udp 0 0 0.0.0.0:2302 0.0.0.0:* 7060/epoch udp 0 0 0.0.0.0:2304 0.0.0.0:* 7060/epoch those ports are bound and forwarded. i tried changing steam query and steam ports to 27016 and 27015 so the configs are working EDIT 2: found nifty command "nc -vu [external ip] 2302" Connection to [external ip] 2302 port [udp/*] succeeded! man im confused now. screw port checker though... using: Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-43-generic x86_64) if that helps BERcon cant connect either BTW Link to comment Share on other sites More sharing options...
DeanReid Posted January 16, 2015 Report Share Posted January 16, 2015 Hate to say this but are you sure you are using the correct password? :P Link to comment Share on other sites More sharing options...
wardevour Posted January 21, 2015 Report Share Posted January 21, 2015 lol yeah i just pasted in what i used in the configs. ill try something different later. i even tried changeme Link to comment Share on other sites More sharing options...
DeanReid Posted January 23, 2015 Report Share Posted January 23, 2015 I just noticed a typo, if you use apt-get you need to do apt-get install php5 php5-cgi spawn-fcgi not php5 php5-cgi Link to comment Share on other sites More sharing options...
Sharkking Posted January 23, 2015 Report Share Posted January 23, 2015 im using BEC with wine and issue a #shutdown when the restart should happen a simple perl script restarts the server anyhow if its away therefore no need for complex scripts (if you just want a restart and nothing else) * * * * * /path/to/perlscript.pl for cron $a2pid = `/usr/bin/pgrep <ARMASERVERNAME>`; if ($a2pid eq "") { @do = `~/restart_server.sh`; } example restart.sh (in this case a wasteland server) #/bin/bash pkill -e arma3server pkill -e Bec.exe pkill -e wine cd ~/ cd battleye echo Starting BEC ... screen -L -h 1024 -dmS bec wine-auto Bec.exe -f Config.cfg --dsc cd .. echo Starting A3 Wasteland Server screen -L -h 1024 -dmS wasteland ./arma3server -mod="@extDB;" -config="wasteland.cfg" -port=2302 -world=empty -profile=Player -noSound -noPause -autoInit sleep 5 echo Services up dirty but working. Only exception is that its actually just working if there is only one instance of the armaserver running Basti890 1 Link to comment Share on other sites More sharing options...