• Content Count

  • Joined

  • Last visited

  • Days Won


Hellgamer last won the day on November 13 2019

Hellgamer had the most liked content!

Community Reputation

1 Neutral

About Hellgamer

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 3 pages on that thread about altering start scripts and the like, as I stated there are lots of fancy scripts out there, I just prefer to keep it simple, using monit to monitor the server gives me an e-mail and I don't need to alter my start script in any way. Apt will update monit with everything else and I can use monit to look after all sorts of things.
  2. If you run a simple server on your own VPS and and like mine it crashes now and again your probably fed up of having to login and start it, my friends usually text me late at night to ask me to fix it. Here's a guide I've written for how my VPS monitors and starts it should it fail. Lets automate starting our server if it fails during map rotate or a glitch on your server. I'm using Ubuntu here but any flavour of linux should be similar. First lets get monit setup apt update apt install monit apt install nano Now we need to edit the monit control file nano /etc/monitrc delete all the standard stuff and replace with this making the edits noted: set daemon 60 set mailserver set alert sales@mydomain.co.uk # set your e-mail here set httpd port 2812 allow alec:password # change user and password check host dels with address # change dels for any name you like start program = "/bin/systemctl start cod4" if failed port 28960 then restart` # your cod4 port here Now restart monit systemctl restart monit Now if you go to your domain or I.P like http://xx.xx.xx.xx:2812 you should see monit in action Create a service file in /lib/systemd/system called cod4.service with nano /lib/systemd/system/cod4.service Enter this and save it: [Unit] Description=Cod4 service [Service] User=cod4 Type=forking ExecStart=/path-of-your-start-script/your-script.sh [Install] WantedBy=multi-user.target So if your cod4 files are in /cod4-linux-server/ and your start script is cod4.sh then ExecStart would read ExecStart=/cod4-linux-server/cod4.sh Now type: systemctl daemon-reload systemctl enable cod4.service Ok now my server start script cod4.sh consists of something like: #!/bin/bash screen -dmS cod4 /cod4-linux-server/cod4x18_dedrun +set r_xassetnum "xmodel=1200" +set sv_authorizemode "0" + set sv_maxclients "64" +set fs_game "mods/rotu2beta" +exec server.cfg +map_rotate Even though systemd is calling your start script which is inside the server directory the script will not find the binary unless the path is absolute so: screen -dmS cod4 /cod4-linux-server/cod4x18_dedrun NOT screen -dmS cod4 ./cod4x18_dedrun now lets restart monit systemctl restart monit Monit webpage will report it is running, if you kill your server you should get an e-mail and it should start again after around 30 seconds I know there are some cool start scripts out there but I didn't want to get fancy just keep the damn thing running. Now that the server is on systemd you can start it anytime with systemctl start cod4
  3. OOps, I forgot to run apt-get install nasm:i386 build-essential gcc-multilib g++-multilib on the new server, I thought this was only needed to install tools to compile the source. It's running now.
  4. Hi all, I'm trying to move a server to a faster vps using scp -r /cod4 user@remotehost:/ everything copies over ok. I then chown -r cod4:cod4 /cod4 however when I try ./cod4.sh it does not start any ideas? I must be missing something
  5. Hi All, I probably did something daft, I am wondering if I am missing something as I cannot get to the page at https://cod4master.cod4x.me to get a token, it just times out. Is it just broken for now ? Is this token still needed? my server doesn't seem able to connect either, startup part of log shows this sv_maxclients\24\_CoD4 X Site\http://cod4x.me\protocol\17\sv_privateClients\2\sv_hostname\Diesel All Weapons\ In qconsole.log I see : Masterserver needs token to complete registration my server is at Any clues? Thank-you