Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Background script logging + fix autorun launching scripts #634

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JasonTarka
Copy link
Contributor

  • Create a logging directory at /var/log/fbctf
  • Redirect STDOUT and STDERR to an appropriate log file
  • When the log function is called in a web request, write to a generic web log file
  • Log when the game starts & ends
  • Log when the scripts are starting
  • Use correct script paths when launching via autorun
    • Found out that this was why the scripts weren't running as a result of adding the logging

- Create a logging directory at `/var/log/fbctf`
- Redirect STDOUT and STDERR to an appropriate log file
- When the log function is called in a web request, write to a generic
  web log file
- Log when the game starts & ends
- Log when the scripts are starting
The background script launching now checks where it's being run
from, rather than just assuming that DOCUMENT_ROOT will always
be available.
This stops `autorun.php` from attempting to start `/scripts/*`,
which doesn't exist.
- Move starting & stopping to `Control`, and call those methods
  - Keeping autorun separate to avoid spamming the log files
- Check whether a script is running before attempting to start it
- Check actual process IDs, rather than hoping the database is accurate
- Kill all instances of a script, rather than just the one in the DB
- More logging to make debugging easier
@legendarynacar
Copy link

so this fixed the base.php execution problem entirely and is this applied (commited) to repository?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants