When executing Docker commands via Python, such as `docker kill -s HUP <container>`, the process may hang because the command produces output that blocks the Python subprocess.
This change appends `> /dev/null` to Docker commands to discard any standard output, ensuring that Python can execute the command without waiting indefinitely.
Systemd commands remain unchanged, as they do not exhibit the same blocking behavior.
Previously, when handling the reload action, the code used `docker kill -S HUP`.
However, the Docker CLI only supports the lowercase `-s` option.
Using `-S` results in an error and prevents the signal from being sent to the container process.
This change:
- Corrects `kill -S HUP` to `kill -s HUP`
- Ensures that in Docker mode, the reload action can properly send the SIGHUP signal
- Keeps the systemd branch logic unchanged
Removed redundant try-except blocks to streamline code and improve readability. Added new fields to JavaScript variables for UI consistency and adjusted HTML structure for better semantics. Removed an unused error message constant.
Extended "mode" options to include "log" for frontend/backend configurations. Enhanced RAM/CPU metrics to better handle remote servers and removed redundant logic. Streamlined logging with structured formatting, improved error handling, and removed unnecessary parameters.
Replaced multiple SQL function calls with consistent `get_server` naming. Consolidated and streamlined the function calls to `get_server` and `get_server_by_ip` to ensure consistency and improve maintainability across the codebase. Removed obsolete and redundant function definitions that were no longer in use.