LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[Bug]: Docker already has an entry in Crontab

Open ben-2357 opened this issue 1 year ago • 5 comments

User story

I want the crontab entry to be removed so users are able to set their own wihtout having to remove/comment it out every time the container is restarted.

Game

PaperMC

Linux distro

Ubuntu 22.04

Command

command: update

Further information

There is a cron entry in the container by default:

*/60 * * * * /app/pmcserver update > /dev/null 2>&1

I don't know if this is intentional, but it is very annoying because I'd like to set my own update interval without having to modify the actual application code. I didn't think it was necessary to make an issue for such a small problem. Thanks!

Relevant log output

No response

Steps to reproduce

  1. Use the container lol

ben-2357 avatar Jan 10 '25 19:01 ben-2357

Which image are you using? I couldn't find any cron entries on the latest GHCR build.

zuedev avatar Jan 18 '25 03:01 zuedev

Maybe it's because I'm using the Docker Hub image?:

services:
  linuxgsm-pmc-bind:
    image: gameservermanagers/gameserver:pmc
    # image: ghcr.io/gameservermanagers/gameserver:pmc

Here's a video showing the latest image.

ben-2357 avatar Jan 18 '25 03:01 ben-2357

Never mind, you're right! I was entering the container without specifying the linuxgsm user.

I agree that having only the docker images preconfigured to update every hour is pretty weird.

I've made a PR for this, hopefully it gets merged!

zuedev avatar Jan 18 '25 03:01 zuedev

I was certain there are other crontab -related issues already, and there are. At least https://github.com/GameServerManagers/LinuxGSM/issues/4584 and https://github.com/GameServerManagers/LinuxGSM/pull/4508 . IIRC I've seen some discussion in another issue somewhere but can not find it ATM (EDIT: realized the latter has nothing to do with the docker images per se). I'm mentioning these here so that everyone is up to date on the feature / issues and pull requests, so that perhaps a common fix can be found.

I agree the default crontab entry needs to go. It is intrusive, as it interrupts gameplay on servers which do not need to be on the bleeding edge and get frequent updates. The users should decide. Currently, I run 'crontab -r' after each reboot and update of the image, but I feel I should not need to.

WildPenquin avatar Feb 17 '25 13:02 WildPenquin

any updates on this?? I don't want my server suddenly start autoupdate at the pick online!

romanvoloboev avatar Jun 11 '25 09:06 romanvoloboev