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

Reboot serv everyday DS LINUX


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vegeta1241
AlliedModders Donor
Join Date: Apr 2017
Location: Switzerland
Old 05-13-2019 , 14:08   Reboot serv everyday DS LINUX
Reply With Quote #1

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
__________________
IDEAS-GAMING.COM SERVERS ON CSGO :

- HIDE AND SEEK - SUPERHEROES
- BUNNY HOP
- KZ / CLIMB

---------------------------------------------------------------------
My steam link
Donate !
vegeta1241 is offline
raj kaul
Member
Join Date: Mar 2018
Location: India Mumbai
Old 05-13-2019 , 15:51   Re: Reboot serv everyday DS LINUX
Reply With Quote #2

I need this too
following
__________________
raj kaul is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 05-13-2019 , 16:36   Re: Reboot serv everyday DS LINUX
Reply With Quote #3

Look into crontab
__________________
Spirit_12 is offline
xkonsole
Member
Join Date: Mar 2018
Old 05-13-2019 , 17:22   Re: Reboot serv everyday DS LINUX
Reply With Quote #4

crontab

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

Though if you need a restart script example, I may provide
xkonsole is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 05-13-2019 , 17:28   Re: Reboot serv everyday DS LINUX
Reply With Quote #5

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.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread]
DarkDeviL is offline
xkonsole
Member
Join Date: Mar 2018
Old 05-13-2019 , 17:39   Re: Reboot serv everyday DS LINUX
Reply With Quote #6

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.
xkonsole is offline
vegeta1241
AlliedModders Donor
Join Date: Apr 2017
Location: Switzerland
Old 05-13-2019 , 19:27   Re: Reboot serv everyday DS LINUX
Reply With Quote #7

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
__________________
IDEAS-GAMING.COM SERVERS ON CSGO :

- HIDE AND SEEK - SUPERHEROES
- BUNNY HOP
- KZ / CLIMB

---------------------------------------------------------------------
My steam link
Donate !

Last edited by vegeta1241; 05-13-2019 at 20:13.
vegeta1241 is offline
xkonsole
Member
Join Date: Mar 2018
Old 05-13-2019 , 21:20   Re: Reboot serv everyday DS LINUX
Reply With Quote #8

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.

Last edited by xkonsole; 05-13-2019 at 21:21.
xkonsole is offline
vegeta1241
AlliedModders Donor
Join Date: Apr 2017
Location: Switzerland
Old 05-14-2019 , 11:52   Re: Reboot serv everyday DS LINUX
Reply With Quote #9

Thx work !
__________________
IDEAS-GAMING.COM SERVERS ON CSGO :

- HIDE AND SEEK - SUPERHEROES
- BUNNY HOP
- KZ / CLIMB

---------------------------------------------------------------------
My steam link
Donate !
vegeta1241 is offline
Reply


Thread Tools
Display Modes

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 10:54.


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