Raised This Month: $51 Target: $400
 12% 

Autoupdate issue


Post New Thread Reply   
 
Thread Tools Display Modes
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 06-12-2017 , 02:43   Re: Autoupdate issue
Reply With Quote #11

Might need to get more technical here. What OS are you using?
__________________
Phaiz is offline
olokos
Member
Join Date: Jun 2016
Old 06-12-2017 , 07:33   Re: Autoupdate issue
Reply With Quote #12

Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-79-generic x86_64)

It's a ubuntu server.
olokos is offline
olokos
Member
Join Date: Jun 2016
Old 06-13-2017 , 13:18   Re: Autoupdate issue
Reply With Quote #13

any ideas?

Last edited by olokos; 06-13-2017 at 13:18.
olokos is offline
olokos
Member
Join Date: Jun 2016
Old 06-16-2017 , 13:57   Re: Autoupdate issue
Reply With Quote #14

I've changed this

Code:
-autoupdate -steam_dir /home/csgoserver/csgoserver-cksurf/steamcmd -autorestart -steamcmd_script /home/csgoserver/csgoserver-cksurf/steamcmd/skrypt_aktualizujacy
to this
Code:
 -autoupdate  -steam_dir   "/home/csgoserver/csgoserver-cksurf/steamcmd"  -steamcmd_script   "/home/csgoserver/csgoserver-cksurf/update.sh"
and it doesnt seem to crash anymore. .sh instead of .txt or no extension could've been the fix here.

Last edited by olokos; 06-16-2017 at 14:48.
olokos is offline
hustl4
Junior Member
Join Date: Jan 2016
Location: USA
Old 06-16-2017 , 15:19   Re: Autoupdate issue
Reply With Quote #15

Here is a small shell script I wrote to autoupdate my linux csgo servers, you just need to modify it a bit with the correct paths. I have it running in cron every 5 minutes:

Code:
/5 * * * * /path/to/autoupdate.sh > /dev/null 2>&1
Code:
#!/bin/bash


DATE=$(date '+%Y_%m_%d_%H_%M')
CSLOG="/home/csgoserver/serverfiles/csgo/console.log" # path to your console.log file
STRING=$(grep -c "Your server is out of date and will be shutdown during" ${CSLOG})

if [ ${STRING} != 0 ]
then

  /path/to/killserver.sh # change this to whatever command or script you use to kill your server (pkill screen, tmux etc)

  # compress and remove the console.log file to prevent the script from falsely detecting an update

  tar -czf console-${DATE}.tar.gz ${CSLOG} && rm ${CSLOG}

  # update the server

  /path/to/steamcmd.sh +login anonymous +force_install_dir /home/csgoserver/serverfiles/ +app_update 740 +quit

  # restart the server

  /path/to/startserver.sh

fi
hustl4 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode