-
Notifications
You must be signed in to change notification settings - Fork 8
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
Updates for crontabs #85
Conversation
allows creating cron jobs during BOOTSTRAP_HOOK
Hey @YodaDaCoda, thanks for the PR and sorry for the late response. |
I'm running a Public Resource World server & want to be able to restart the server hourly to reset containers etc back to their initial state. Doing so outside the container isn't quite as simple as using the bootstrap hook to overwrite the save files and setup a cron job. Understandable if you feel the restart script isn't necessarily something that fits with your vision of this project, but it'd be great to at least include the other change. |
So you want to kill the container completely or would it be enough to just restart the enshrouded server process inside? The initCrontab change, is no problem - I'll test it locally in the coming days. |
Restarting the enshrouded process would be enough, but I didn't see a clear way of doing that cleanly (skill issue). I took inspiration from scripts/default/enshrouded-reset-roles |
Hey @YodaDaCoda, I just thought about your use case. You want to restart the enshrouded server periodically with a cronjob script. Would it not be enough to just call I just tested, the enshrouded user, can also call supervisorctl commands. |
And the suggested change for the crontab is unfortunately not possible. If you keep the crontab between restarts you basically add duplicates of the same cron.
But I see your problem there and have a solution for that. I can move the info "Running enshrouded-bootstrap"
prepareEnshroudedAppFolders
updateOrCreateEnshroudedServerConfig
prepareSteamA2sPythonLibrary
# old bootstrapHook position <---
# no proton bootstrap needed
initCrontab
bootstrapHook # <--- moved down
supervisorctl start enshrouded-updater
info "Bootstrap complete" Will this be sufficient? To keep it compatible I probably add another Hook |
Yeah that's probably enough. It wasn't clear to me how to achieve it so I thought a script with a name that indicated what it did would be helpful but happy to remove.
You can deconflict this (and I do in my bootstrap hook script), but it's probably more effort than it's worth, particularly if...
Yes please, this would be fantastic! |
refactor: moved bootstrap hook to after crontab is initialized (fixes #85)
@YodaDaCoda, the changes are on the current develop build (e.g. |
initCrontab()
- allows for cron jobs to be created during BOOTSTRAP_HOOK