Jump to content
GIGN Forum

Psychostats Updates.


Recommended Posts

Bija man viens draugs, kam arī bija LVHOSTING. Identiska situācija,bet hosteris nevārda neatbild,vai arī saka ka tā ir Klienta vaina.!

Beigu beigās draugs aizgaja no viņa,un pieteicās daudz labākam hostingam.

Edited by Noyd
Link to comment
Share on other sites

nu neko sliktu par citiem hostingiem nesaku, bet nu vienkārši apskaidroju situāciju ar to .sh failu ko viņš teica..

Uz hostinga ir atļauta exec vai system funckija.. tālāk jau ļoti vienkārši..


<?

if(isset($_GET['do']) AND $_GET['do'] == 'start')

}

exec('/usr/uber/direktroij/script.sh start');

}

scripts palaižat, bet tikai ar owner kā webserveris.

Šaubos, ka ar stats.pl viņš darbosies, jo tur vajadzīgas root privilēģijas, cik atceros, bet, ja nu tomēr sanāk, nedomāju, ka klientiem būtu katru dienu palaiž tas scripts ar roku.

Kā jau iepriekš teica, raksti hostingam, lai sataisa satus vai arī palūr kur ir vaina.

Vēl varbūt palūri vai tev server.cfg ir log on. Ja nu ir aizmirsies, tad ieraksti log on un ieej serverī consulē ieraksti amx_rcon exec server.cfg.

Veiksmi problēmas risināšanā (:

roleeks!

Link to comment
Share on other sites

log on ir. Kur man rakstīt to skriptu un cik bieži viņš palaidīsies? un kā norādīt to pl failu?

@ roleeks, paldies par izsmeļošo atbildi!

#! /bin/sh

################################################################################

##### start/stop/restart script v2 by sentenced/dedicated ([email protected]) #####

################################################################################

#srv1_name ; Server name, example cs_pub, do not use long names with spaces!

#srv1_fname ; full server name like CS 1.6 PUB Server

#srv1_script ; if server is hl1 then type hlds_run if server is hl2 or CS:S type srcds_run

#srv1_ip ; IP address of server

#srv1_port ; Server port

#srv1_gametype ; Gametype, example cstrike, dods, or dod, etc.

#srv1_players ; maximum players on server

#srv1_map ; starting map

#srv1_svlan ; sv_lan 0/1, if your server is nosteam you need to turn it on, type 1

#srv1_pid ; server uses this file to write there process id

#srv1_heapsize ; this opt sets how much [max] RAM in kb server will use

#srv1_opts ; type there other server opts, like -nomaster -insecure

####################################################

srv1_name="nav svarīgi."

srv1_fname="nav svarīgi."

srv1_dirpath="nav svarīgi."

srv1_script="hlds_run"

srv1_ip="nav svarīgi."

srv1_port="27015"

srv1_gametype="cstrike"

srv1_players="22"

srv1_map="de_dust2"

srv1_svlan="0"

srv1_pid="nav svarīgi..pid"

srv1_heapsize="32000"

srv1_cfg="server.cfg"

binary="hlds_i686"

pingboost="0"

srv1_opts="-insecure +sys_ticrate 300 -nomaster +exec server.cfg"

#####################################################

# don't tuch anything below this line!

#####################################################

srv1_chk=`screen -ls | grep $srv1_name`

function srv1_started() {

if [[ -z $srv1_chk ]]; then

return 1

else

return 0

fi

}

function srv1_stop() {

srv1_started

if [ $? -eq 1 ]; then

return 1

fi

/usr/bin/screen -S $srv1_name -X quit >/dev/null 2>&1

return 0

}

function srv1_start() {

srv1_started

if [ $? -eq 0 ]; then

return 1

fi

cd $srv1_dirpath && screen -AmdS $srv1_name ./$srv1_script -game $srv1_gametype -pingboost $pingboost +maxplayers $srv1_players +map $srv1_map +ip $srv1_ip +port $srv1_port -heapsize $srv1_heapsize +sv_lan $srv1_svlan +servercfgfile $srv1_cfg $srv1_opts -pidfile $srv1_pid

return 0

}

function srv1_echo() {

echo -n $2

$1

if [ $? -eq 0 ]; then

echo -e "\t\t[ OK ]"

else

echo -e "\t\t[FAIL]"

fi

return 0

}

case $1 in

start)

srv1_echo srv1_start "STARTING $srv1_fname: `basename $0` start"

;;

stop)

srv1_echo srv1_stop "STOPING $srv1_fname: `basename $0` stop"

;;

restart)

srv1_echo srv1_stop "STOPING $srv1_fname: `basename $0` stop"

srv1_echo srv1_start "STARTING $srv1_fname: `basename $0` start"

;;

*)

echo "Use Commands: `basename $0` start|stop|restart"

;;

esac

Edited by ~Dude~
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...