-
-
Notifications
You must be signed in to change notification settings - Fork 831
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
[Bug]: Command_Monitor.sh not working properly as Cron Job #4316
Comments
This is also happening to me; also using Ubuntu; hearing the version of Ubuntu does not seem to matter. For what it's worth, I'm using LinuxGSM to manage 7 Days to Die. |
Thanks for the info. I am reviewing a couple of bugs relating to monitor. I will try and replicate this as well |
Thanks! Let me know if you need anything else, I'll be glad to provide more info if you need. |
I am also having this issue. Same OS. Latest update. |
Same problem with Debian 12 |
So this is a fun bug to identify. It appears to only happen with cron or watch. Bash appears to just stop running. I will continue doing tests until I find the issue. A hotfix will go out once fixed |
Well I'm glad to hear it's fun! :) Thanks for your time, I'm sure we all greatly appreciate the hard work you put into this project. Good luck finding the solution. I'll keep my eye out for any updates. |
Found the issue. cron uses a different environment to the default bash one (sh) and it is missing the $USER variable. So I added code to set the $USER variable if missing. Hopfully that should now fix the issue. Please update linuxgsm and let me know :) |
Thanks man, I'll update and let you know the results shortly. |
Tested and it looks to be working. Thanks so much for getting this resolved. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
User story
Command_Monitor not working properly as Cron Job after latest update
Game
Rust
Linux distro
Ubuntu 22.04, Ubuntu 20.04
Command
command: monitor
Further information
LGSM Monitor is no longer restarting game server after an update-lgsm was done on 9-17-23. This was working properly before a scheduled task to update-lgsm was done. (0 0 * * 0 /home/rustserver/rustserver update-lgsm > /dev/null 2>&1)
This is being run as a cron job. (*/5 * * * * /home/rustserver/rustserver monitor > /dev/null 2>&1)
When ran from CLI (./rustserver monitor) this functions as expected but when running as a Cron job this fails.
Log files are included
Relevant log output
Steps to reproduce
The text was updated successfully, but these errors were encountered: