mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #134] script not creating lock file - TF2 server #108
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @twinsuns on GitHub (Aug 8, 2014).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/134
When I start a TF2 server a lock file is not being created, so when I try running
./tf2server monitorI getNo lock file found: Monitor disabled.If I manually create it using
date > .tf2-server.lockI can run monitoring fine and the lock file gets removed on server stop. But for some reason lock files simply are not being created on server start.Also I haven't modified the core script in any way.
@DreamDemon commented on GitHub (Aug 8, 2014):
Which flavor of linux are you using?
@twinsuns commented on GitHub (Aug 8, 2014):
CentOS 6.5
@DreamDemon commented on GitHub (Aug 8, 2014):
Are you running the start command from cron?
@twinsuns commented on GitHub (Aug 8, 2014):
Nope, I start the server on boot in rc.local using
./tf2server update-restartto check that the game is up to date. On further investigation I notice that when runningstartorrestartthen the lock file gets created fine. It just seems to be when usingupdate-restartthat the issue occurs.@DreamDemon commented on GitHub (Aug 8, 2014):
Merely as a suggestion, mine is set to use just the start command in there. I have a cron job that runs at 5am that does the update-restart command. Additionally, mine uses the full path (eg. /opt/cssserver update-restart) which works without a hitch.
@twinsuns commented on GitHub (Aug 9, 2014):
Thanks for the suggestion, however it doesn't solve the problem as however I run
update-restart(even from a cron job and using the full path), it will still remove the existing lock file and fail to create a new one.So the problem still stands and somehow revolves around
update-restartonly, weird.For a temporary workaround I will run the
updatethenstartcommands separately and see how that goes.@dgibbs64 commented on GitHub (Aug 9, 2014):
The lock file is a new feature. I will check update-restart to figure out why it is not functioning. Stay tuned :-)
@dgibbs64 commented on GitHub (Aug 10, 2014):
Does update-restart work normally when not using it on boot. My guess is it is only not working when using rc.local.
The lock file is created by outputting the date to the lock file. My guess is that on boot the date command maybe does not function correctly on boot.
@twinsuns commented on GitHub (Aug 10, 2014):
Nope, no matter how I run
update-restart(whether it be normally, in a cron job or on boot) it still will not create a lock file. It's really strange sincestartandrestartcreate it fine.However my workaround of running
updateand thenstartseparately on boot seems to be working fine so far, therefore it's not the end of the world if you can't think of a solution. :)Many thanks anyways.
@markgs commented on GitHub (Aug 24, 2014):
Hi. Sorry I am new here. May I reply to this topic or do I create a new?
I'm using Daniel Gibb's L4D2 GS Script. I've the "No lock file found: Monitor disabled" issue too.
I changed the service name from "l4d2server" to "testserver1" and the monitor function wont work. Creating a new lock file gets deleted when the server stops.
@dgibbs64 commented on GitHub (Aug 26, 2014):
I have just tested this functionality and cannot replicate the issue.
Just to clarify the lock file functionality.
When you run./tf2server start a lock file is created that activates the monitor. Without the lockfile monitor is disabled.
When you run ./tf2server stop the lockfile is removed. This disables the monitor.
You MUST use the start function to start the server.
For example on boot you should be able to use the following to start the server.
./tf2server start
./tf2server restart
./tf2server update-restart
./tf2server validate-restart
However if you use
./tf2server monitor on boot this will not work.
this functionality was added to prevent the monitor starting the server after an admin deliberately stopped the server.
I have looked at the code and I see no reason why there is an issue. The code below shows all update-restart does.
This is the equivalent of running
./tf2server stop
./tf2server update
./tf2server start
One after the other
Hope this help
@lock[bot] commented on GitHub (Jul 20, 2018):
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.