Guest JPhix Posted March 2, 2014 Report Share Posted March 2, 2014 i was wondering if there is any way to possibly send out restart warnings with the linux server? Link to comment Share on other sites More sharing options...
DeanReid Posted March 3, 2014 Report Share Posted March 3, 2014 I'm going to assume it has to be on the same system? Link to comment Share on other sites More sharing options...
Guest JPhix Posted March 3, 2014 Report Share Posted March 3, 2014 yeah i have no intention of running wine on my linux server was kinda hoped it could be done through a script or something like that if thats the only way then i guess i'll dig around the rcon code and make somthing in php and run a couple of cronjobs Link to comment Share on other sites More sharing options...
DeanReid Posted March 4, 2014 Report Share Posted March 4, 2014 If you do, figure something out let me know :) Link to comment Share on other sites More sharing options...
JPhix Posted March 5, 2014 Report Share Posted March 5, 2014 well so far i cant even connect to my servers battleye so untill i can get that working cant do anything message wise i'v tryed in /home/dayz/arma2ao/cfgdayz/battleye /home/dayz/arma2ao/expansion/battleye and /home/dayz/arma2ao/battleye and still nothing for changeme or the password i set in the files any idea's ? Link to comment Share on other sites More sharing options...
DeanReid Posted March 5, 2014 Report Share Posted March 5, 2014 It should be the battleye in the expansion folder you edit, make sure its readable though Link to comment Share on other sites More sharing options...
JPhix Posted March 5, 2014 Report Share Posted March 5, 2014 i'v made the 3 battleye folders chmod 0777 yet still wont let me login via battleye Link to comment Share on other sites More sharing options...
JPhix Posted March 6, 2014 Report Share Posted March 6, 2014 ok i have a working set of php scripts for restart messages now :) feel like an idiot xD had battleye = 0 set in the server config xD i'll upload with cronjob details later Link to comment Share on other sites More sharing options...
JPhix Posted March 6, 2014 Report Share Posted March 6, 2014 ok heres my Cronjobs 30 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/30min.php 45 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/15min.php 50 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/10min.php 55 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/5min.php 56 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/4min.php 57 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/3min.php 58 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/2min.php 59 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/1min.php Download link http://188.165.219.207/Restart.tar.gz simple as edit config.php setup the cronjobs and u have 30 min warnings on restarts Link to comment Share on other sites More sharing options...
DeanReid Posted March 8, 2014 Report Share Posted March 8, 2014 Awesome, Thanks dude, I'll check these out now :) Link to comment Share on other sites More sharing options...
jahangir13 Posted March 12, 2014 Report Share Posted March 12, 2014 Great work! File 5min does not include/reference the config. Just copy any other file to 5min.php and change the text at the beginning accordingly. Link to comment Share on other sites More sharing options...
Musyanon Posted March 16, 2014 Report Share Posted March 16, 2014 ok heres my Cronjobs 30 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/30min.php 45 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/15min.php 50 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/10min.php 55 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/5min.php 56 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/4min.php 57 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/3min.php 58 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/2min.php 59 3,7,11,15,19,23 * * * php -q /home/dayz/Restart/1min.php Download link http://188.165.219.207/Restart.tar.gz simple as edit config.php setup the cronjobs and u have 30 min warnings on restarts Hi, How to use this for auto restart ? Please Just edit the config.php and add the rules in cron? And the server restart every 4 hours? Thanks Edite : When I execute this commande : php -q /home/serveur/arma2/restart/30min.php I get this : Got Socket! Attempting Login And nothing else, no work, why ? :( Edit 2: I use this in my cron : 0 0,4,8,12,16,20 * * * cd / && /home/serveur/arma2/restarter.pl 30 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/30min.php 45 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/15min.php 50 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/10min.php 55 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/5min.php 56 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/4min.php 57 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/3min.php 58 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/2min.php 59 3,7,11,15,19,23 * * * php -q /home/serveur/arma2/restart/1min.php But it not work... No restart. Link to comment Share on other sites More sharing options...
jahangir13 Posted March 16, 2014 Report Share Posted March 16, 2014 Hey Musyanon, normally you restart yoiur (Windows) Server via BEC or something similar. You cannot use this under linux. For the linux server adaptions by DEVD you need to restart the server via the restarter.pl script. The scripts we are talking about here is only a warning send to the players via an php battleye client. These scripts do NOT restart the server, they just remember the peolple playing on the server (at 60, 40, 15,... mins before your scheduled restart of restarter.pl in crontab). Regards, jahan. Link to comment Share on other sites More sharing options...
Musyanon Posted March 16, 2014 Report Share Posted March 16, 2014 Hi jahangir13, I use a linux server : https://github.com/denisio/Dayz-Epoch-Linux-Server Normally with this line "0 0,4,8,12,16,20 * * * cd / && /home/serveur/arma2/restarter.pl" in cron, the server must be restarted, right ? Why it does not work ? And why reboot messages does not work also ? I forget some thing ? Thanks Link to comment Share on other sites More sharing options...
jahangir13 Posted March 17, 2014 Report Share Posted March 17, 2014 Hm, add this at the end of your crontab line to log something to a file: >> /home/serveur/arma2/restart.log I guess the epoch binary can not be found or something. I set the path contant in the beginning of my restarter.pl to the absolute path to my server directory. Restart messages: you forgot to mention what you did to set this up and why you think it's not working. Link to comment Share on other sites More sharing options...
Musyanon Posted March 17, 2014 Report Share Posted March 17, 2014 Hm, add this at the end of your crontab line to log something to a file: >> /home/serveur/arma2/restart.log I guess the epoch binary can not be found or something. I set the path contant in the beginning of my restarter.pl to the absolute path to my server directory. Restart messages: you forgot to mention what you did to set this up and why you think it's not working. Here is the log : Got Socket! Attempting Login Got Socket! Attempting Login Got Socket! Attempting Login Got Socket! Attempting Login Got Socket! Attempting Login Got Socket! Attempting Login Got Socket! Attempting Login Got Socket! Attempting Login Can't found server binary! About restart messages I placed the scripts in folder "restart" at the root of my server folder. And I edit the config.php file <?php define("address","127.0.0.1"); // server address define("port","2302"); // server port define("password","mypasswd"); // battleye password ?> But nothing works :( If I put a wrong password in the config.php, I get the message "Login Failed!". So I guess the problem is not there What should I change in the restarter.pl? Thank you for your help Link to comment Share on other sites More sharing options...
jahangir13 Posted March 18, 2014 Report Share Posted March 18, 2014 Change the PATH at the beginning of restarter.pl to your server dir. e.g.: use constant PATH => '/home/dayz/server1042/'; Then the script will find the binary and everything else executed from everywhere. For the restart message scripts it does not matter where they are. If the server runs and the password is correct they send a message whenever you execute them. Each should be executed by cron X minutes before restart really happens as shown in the thread for the restart scripts. E.g.: 55 3,7,11,15,19,23 * * * php5 /home/dayz/Restart/5min.php (Which warns 5 minutes before restart; at 5 before 4, 5 before 8, 5 before 12 and so on. Such a line you will need for each script.) Link to comment Share on other sites More sharing options...
Musyanon Posted March 18, 2014 Report Share Posted March 18, 2014 Ok, restarting it works now! But the messages are not sent, why it hangs on Attempting Login ?? Link to comment Share on other sites More sharing options...
jahangir13 Posted March 18, 2014 Report Share Posted March 18, 2014 Wrong password? This is the battleye server password in expansion/battleye/beserver.cfg, not your servers admin password. Link to comment Share on other sites More sharing options...
Musyanon Posted March 18, 2014 Report Share Posted March 18, 2014 Wrong password? This is the battleye server password in expansion/battleye/beserver.cfg, not your servers admin password. Yes but not work Link to comment Share on other sites More sharing options...
DeanReid Posted March 20, 2014 Report Share Posted March 20, 2014 define("address","127.0.0.1"); // server address define("port","2302"); // server port define("password","mypasswd"); // battleye password ?> But nothing works :( If I put a wrong password in the config.php, I get the message "Login Failed!". So I guess the problem is not there What should I change in the restarter.pl? Thank you for your help try using the external ip, eg. 123.456.789.321 Link to comment Share on other sites More sharing options...
jahangir13 Posted March 20, 2014 Report Share Posted March 20, 2014 Localhost works for me...so the loopback adress will also. Maybe the same problem that jphix had in the beginning: battleye=0 in the server config. If not and you still want help, please post a bit more to have a look into. Are you able to connect to battleye from inside the game? Link to comment Share on other sites More sharing options...
Musyanon Posted March 21, 2014 Report Share Posted March 21, 2014 Hi, Same problem with IP adress. Battleye is active, I can connect it with EPM RCon Tool Link to comment Share on other sites More sharing options...
jahangir13 Posted March 22, 2014 Report Share Posted March 22, 2014 @all: if you don't want to get lots of emails to your servers user account add somethig like '>/dev/null 2>&1' behind your script execution lines in cron: E.g. 00 2,6,10,14,18,22 * * * php5 /home/dayzepoch/Restart/120min.php >/dev/null 2>&1 I recognized today that I had thousands of mails with the succes messages of the restart warning scripts ('mail' in shell). Link to comment Share on other sites More sharing options...
devd Posted April 21, 2014 Report Share Posted April 21, 2014 I recommend using a custom debug panel with countdown timer. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now