Jump to content

Automated Messages for restart


Guest JPhix

Recommended Posts

The call never returns because it blocks - it waits for input from the server. The connection code is broken and doesn't detect an error (and because this is UDP, the error might not be even detectable). Double check that the values in config.php - and especially the port - are correct. 

 

OK had a think about this and went back to basics   ... time to put on the IDIOT cap.

 

I had RConPassword in expansion/battleye/beserver_active_xxxxxxxx.cfg and password in config.php both set to "zombieLove" (passwords changed to protect the stupid) and passwordAdmin in cfgdayz/server.cfg set to "zombiieLove".

 

Using "zombiieLove" in config.php (technically the correct password) caused a "Login Failed!" message because it didn't match battleye's RConPassword.

Using "zombieLove" (technically the wrong password) passed the wrong password check in the php code but hung the connection with no error message.

 

Correcting passwordAdmin in cfgdayz/server.cfg to "zombieLove" has resolved the issue totally.

 

I hope I've explained in an understandable way, it's one of the those subtle "logical errors" that doesn't cause an error but stops the code from working properly.

 

Moral : Double-double check for typos.

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Hm, the original script did always work well for me.

 

Just called them via cron like this:

00 2,6,10,14,18,22 * * * php5 /home/dayzepoch/Restart/60min.php >/dev/null 2>&1

 

Just check if you can call php or php5 from the shell directly with the scripts, then it also works from cron. As Trollspace said, always use absolute paths (to the scripts, not essentially to the application).

It' s a bit annoying that there is a script for each time...but after setting this up once you never care about it.

 

The only problem is that cron execute these at exactly the time you define...but maybe the server has been restartet in between. So until the next regular restart the time you may show in a custom debug monitor ('Next restart in xxx minutes' is not the same as the cron script message shows.

Link to comment
Share on other sites

  • 5 months later...

Hello,

 

when i execute one of the php files the output says to me all went well. But the script don´t post any reboot message on the server. 

php -f 30min.php
Got Socket!
Attempting Login
Login Successful!
RCon admin #0 (IP:PORT) logged in
say -1 Server Restart in 30 Minutes.

Does anybody why the messages dont appear inside of the server?

 

thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

  • Discord

×
×
  • Create New...