AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Reboot serv everyday DS LINUX (https://forums.alliedmods.net/showthread.php?t=316229)

vegeta1241 05-13-2019 14:08

Reboot serv everyday DS LINUX
 
Hello,

I have many servers CS:GO on my DS on linux, but idk how i can make a reboot aumatically for every day at 6:00, and print msg before it,

somebody can help me

raj kaul 05-13-2019 15:51

Re: Reboot serv everyday DS LINUX
 
I need this too
following

Spirit_12 05-13-2019 16:36

Re: Reboot serv everyday DS LINUX
 
Look into crontab

xkonsole 05-13-2019 17:22

Re: Reboot serv everyday DS LINUX
 
crontab

55 5 * * * /home/steam/server/restart.sh

Though if you need a restart script example, I may provide

DarkDeviL 05-13-2019 17:28

Re: Reboot serv everyday DS LINUX
 
With Linux, you can simply make a crontab every day at 6:00 am, kills the srcds_linux program.

The srcds_run "wrapper" will automatically re-start it after 10 seconds.

Easy way, without the need of a plugin. Although no messages will be shown, and players will time out like if the server crashed.

Some alternatives:
- [ANY] Server Crontab
- [ANY] Full Cronjob Plugin [Execute commands on time intervals / game events]

Here you can set it to every minute (e.g. for the 5 minutes before), a message will be printed, until it at the 6th time, it will just execute "quit", which would again make the srcds_run wrapper auto-restart the server (with Linux at least).

So like set to make "sm_msay" or something at 5:55, 5:56, 5:57, 5:58 and 5:59, then to "quit" at 6:00.

xkonsole 05-13-2019 17:39

Re: Reboot serv everyday DS LINUX
 
Meh

1. At least you'd like to warn players that are still on about restart
2. when wrapper restarts it - taskset cpu assignment is lost

I personally think using plugins for this is excess. Everything is done fine with bash here.

vegeta1241 05-13-2019 19:27

Re: Reboot serv everyday DS LINUX
 
i woold like the restart.sh if you want
because to reboot i use

reboot
user login
password
cd ..
cd /home/csgoserver/serverfiles/
./startserver.sh

this is my start server

Quote:

screen -A -m -d -S csgoserver ./srcds_run -game csgo -console -condebug -autoupdate -tickrate 128 -usercon +sv_setsteamaccount XXXXXXXXXXX +hostport 27015 +net_public_adr 37.59.132.246 +game_type 0 +game_mode 0 +mapgroup mg_bomb +map kz_giantbean -net_port_try 1

xkonsole 05-13-2019 21:20

Re: Reboot serv everyday DS LINUX
 
Somehow I cannot paste bash script here.
https://pastebin.com/eBPNJUzK

ofc you'll need to change the following vars:

screen_name
dir
start
port

"scrsend sm_retryandrestart" this line is pretty optional. using this https://www.sourcemod.net/plugins.ph...retry&search=1 script sends "retry" to all players, which makes them rejoin.

vegeta1241 05-14-2019 11:52

Re: Reboot serv everyday DS LINUX
 
Thx work !


All times are GMT -4. The time now is 22:46.

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