Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart server not shutdown #4

Open
daffyyyy opened this issue Nov 13, 2023 · 4 comments
Open

Restart server not shutdown #4

daffyyyy opened this issue Nov 13, 2023 · 4 comments

Comments

@daffyyyy
Copy link

daffyyyy commented Nov 13, 2023

Hi,
Don't use stop command but combination

execute server command -> sv_cheats 1
and crash server -> auto restart
execute server command -> crash

@Ejz85
Copy link

Ejz85 commented Nov 14, 2023

I'm all for a solution that restarts rather than shutdown. So if thats possible somehow, that would be great.

Btw, how does your -autoupdate script look like? Mine does not update when I start the server like it used to do in CSGO. Mine looks like this:

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
login anonymous
force_install_dir /home/server1
app_update 730
quit

@b-zee
Copy link

b-zee commented Nov 17, 2023

I don't know anything about the possibilities to restart, but the name of this tool might be misleading. A more accurate name would be cs2-shutdown-on-update.

@BrutalCSEjziponken, I think you need force_install_dir before login. I have this in a script: steamcmd +force_install_dir "${cs2_path}" +login anonymous +app_update 730 +quit.

@Ejz85
Copy link

Ejz85 commented Nov 21, 2023

I don't know anything about the possibilities to restart, but the name of this tool might be misleading. A more accurate name would be cs2-shutdown-on-update.

@BrutalCSEjziponken, I think you need force_install_dir before login. I have this in a script: steamcmd +force_install_dir "${cs2_path}" +login anonymous +app_update 730 +quit.

So your server is updating with this script? Without a 3rd party tool that handles updates? Just a command line and the script? Where exactly do you add: "steamcmd +force_install_dir "${cs2_path}" +login anonymous +app_update 730 +quit."

Edit: I think i figured it out.. But.. It still wont actually run when I start a server. I dont really need manual work.. :D

@b-zee
Copy link

b-zee commented Nov 21, 2023

My full shell script would be:

#!/bin/sh
set -eux

cs2_path=/home/cs2server/data

while true; do
	steamcmd +force_install_dir "${cs2_path}" +login anonymous +app_update 730 +quit

	TARGET_DIR="${cs2_path}/game/csgo" ~/acmrs.sh

	(cd "${cs2_path}/game/bin/linuxsteamrt64/" && { ./cs2 -dedicated -usercon -console +exec server.cfg +map de_dust2 || true ; } )
done

Running this by just doing ./run.sh should just keep everything going. I've edited the acmrs.sh (a script that prevents messing up gameinfo.gi) so I can pass the directory through a variable.

Still pretty new of course, but so far I don't have anything to complain about.


Does the plugin really just shut down the server?

Yes, if I'm interpreting the source code right: it executes quit if an update is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants