Closed twinsuns closed 10 years ago
Which flavor of linux are you using?
CentOS 6.5
Are you running the start command from cron?
Nope, I start the server on boot in rc.local using ./tf2server update-restart
to check that the game is up to date. On further investigation I notice that when running start
or restart
then the lock file gets created fine. It just seems to be when using update-restart
that the issue occurs.
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.
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-restart
only, weird.
For a temporary workaround I will run the update
then start
commands separately and see how that goes.
The lock file is a new feature. I will check update-restart to figure out why it is not functioning. Stay tuned :-)
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.
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 sincestart
and restart
create it fine.
However my workaround of running update
and then start
separately 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.
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.
I have just tested this functionality and cannot replicate the issue.
tf2server@vps83003:~$ ./tf2server update-restart
[ OK ] Stopping tf2-server: test
[ OK ] Updating tf2-server: testRedirecting stderr to '/home/tf2server/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
Connecting anonymously to Steam Public...Logged in OK
Waiting for license info...OK
Success! App '232250' already up to date.
[ OK ] Starting tf2-server: test
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.
update-restart)
fn_stopserver
fn_updateserver
fn_startserver;;
This is the equivalent of running ./tf2server stop ./tf2server update ./tf2server start
One after the other
Hope this help
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.
When I start a TF2 server a lock file is not being created, so when I try running
./tf2server monitor
I getNo lock file found: Monitor disabled
.If I manually create it using
date > .tf2-server.lock
I 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.