Benutzer-Werkzeuge

Webseiten-Werkzeuge


csgo_beta:autoupdate

Selbstgebastelte Autoupdatefunktion

Rudimentäre Autoupdatefunktion.
Den Anweisungen im Script folgen und den Server mit -autoupdate starten.
Script wird noch verbessert…
Das Script muss als steam abgespeichert werden, ausführbar sein und im Serververzeichnis befinden.
PS: Sollte nur eingesetzt werden, wenn andere Benutzer nur Zugriff via chrooted FTP haben.

#!/bin/sh
 
steamsh='/opt/steamcmd/steam.sh'
steamexe='steamcmd'
loginScript=login
authcode=code
steampath="`dirname $steamsh`"
passwdfile="pass"
 
#steamcmdkacke als Root in /opt/steamcmd/ installieren
 
#Inhalt von /opt/steamcmd/login
#login Benutzer Passwort
 
#Inhalt für Authcode falls erforderlich nach /opt/steamcmd/code packen
 
#Passwort in /opt/steamcmd/pass speichern
 
# /opt/steamcmd/login mit gpg verschlüsseln:
# gpg -c /opt/steamcmd/login
# Passwort eingeben, dass in pass gespeichert ist
# rm /opt/steamcmd/login
# mv /opt/steamcmd/login.gpg /opt/steamcmd/login
 
#dirty hack
#am Ende
#chmod -R 777 /opt/steamcmd/
 
 
#das script steam ausführbar machen
#in das serververzeichnis packen
#server mit autoupdate starten
 
 
[ -x $steamsh ] || exit
[ -x $steampath/linux32/$steamcmd ] || exit
[ -r $steampath/$loginScript ] || exit
[ -r $steampath/$passwdfile ] || exit
 
pass="`cat "$steampath/$passwdfile"`"
cd "`dirname $0`"
tmp=''
pwd="`pwd`"
 
pass=`gpg --passphrase $pass -d $steampath/$loginScript 2>/dev/null`
[ -z "$pass" ] && exit
if [ -r "$steampath/$authcode" ]; then
code=''
code="`cat $steampath/$authcode`"
tmp="set_steam_guard_code $code
$pass
force_install_dir $pwd
app_update 740
quit"
code=''
else
tmp="$pass
force_install_dir $pwd
app_update 740
quit"
fi
 
pass=''
 
echo "Updating CS:GO"
STEAMEXE="$steamexe" $steamsh 2>/dev/null <<EOF
$tmp
EOF
tmp=''
csgo_beta/autoupdate.txt · Zuletzt geändert: 2012/07/05 01:22 von DeaD_EyE