-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
question for linuxgsm/root user, and custom crontab #39
Comments
Some (most?) of the scripts, for me, don't point to the 'serverfiles' if/when run via CRONTAB I redirected the jobs to a log file so I could see some of the issue(s):
Running these manually, via LINUXGSM/console (mostly) works (backup is still dorked), but via CRON, the path to the serverfiles doesn't rectify to '/data' but a subfolder of '/app':
The update-lgsm seems to function as expected @ least |
yes, the root folder its wrong, i find backup problem have same question. if i try to backup server with this command
it will backup the /app/serverfiles, not the /data/serverfiles, even i using linuxgsm user before exec the container. I think it's all a matter of environment variables. |
'Odd' that the install & running of the server functions as expected (w/o the ENV variable), but these script(s)+ don't mirror the same shrug |
Tried to utilize the ENVIRONMENT over-ride. No love there either: |
I also faced the same wrong-directory issue when debugging why the container's default cronjob to update the gameserver was not working. My workaround was to create a symlink for That said, I haven't been able to test if it will actually update the gameserver, as I need to wait for a new gameserver update.
|
Hacky, which I try to shy away from....You'd need to do the same for the LOG folder as the RESTART will "re-create" a few paths as well (least it does RESTART this time shrug):
Output:
|
Interesting as everything should point to /data |
Yes, should. Unfort, something in the logic is dorked in (most) any CRONTAB calls. If you have any process I can follow to get you some decent logs for debugging (outside of the existing GIT 'bug' reports I've posted), I'll be glad to lend a hand |
Before I found this bug report, I had suspected an issue with environment variables and was able to use this invocation to isolate the
This relies on the behavior documented in If I had to guess, it looks like the |
I had posted prior, having attempted a test re: LGSM_SERVERFILES...no love. Maybe something else I had missed (my Linux+ Fu being minimal...but learning) Not too worried about the BACKUP, as I've rolled my own that does more (& better) than the LGSM built-in. It's the UPDATE & RESTART that still need hands-on (esp. w/ their symbolic links/re-mapping of folders to monitor/etc.) |
I'm not as familiar with Docker Compose files as I am with Kubernetes manifests, but it seems as though the You might be able to try something like this, where the env-vars are always passed to all cronjobs in the container. The kicker is that you have to do this before the container's
|
I had the same issue. The solutions that @compdude22 explained work. sudo cp /etc/environment /etc/environment.old
sudo env | sudo tee -a /etc/environment This puts all environment variables in your /etc/environment file, where your cronjobs also have access to. Since all this runs containerized this feels like viable work-around. |
I'll have to start a fresh/vanilla container & try a few things out, TY. For the 2nd half, I think creating the required links will do the trick. Again, have to test:
Esp. as my CRON jobs seem to show these 'missing links' getting (re)created via LGSM reported here I've also moved away from the LGSM Backup & rolled my own (scripts+ are further down that same link above). I can just grab what I need w/o the SteamCMD server files+ bloating the backup/SSD space |
Just an FYI I have now created a symlink from |
hello everyone,
i try to use custom crontab in linuxgsm user, and i find out it will restore to default if i restart container, and even before restart container, the crontab will not work as expected, like no run the command
here is the crontab
and then i try to set up crontab in root user like this
it can't run either.
when i run command alone, its show "server not running".
then i type
seems its wrong config file path. maybe its environment problem? but i check the 'env' in linuxgsm user and root user, its the same.
here is my docker-compose
any idea for it ?
The text was updated successfully, but these errors were encountered: