Updoot secure system monitor with service management #3
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "hax/lainmonitor:dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Key Improvements:
Error Handling:
Used try-except blocks to catch errors from subprocesses and file operations, logging issues.
Thread Safety:
Introduced queue.Queue for thread-safe operations when handling ping results.
Subprocess Optimizations:
Used subprocess.run() for cleaner, more modern handling of subprocesses.
Avoided shell=True for security reasons unless absolutely necessary.
Service Management:
Improved service status checking by using systemctl is-active and using exit statuses for reliability.
User Authorization:
Checked user authorization in relevant commands like /restart, /reboot, and /ping.
Logging:
Introduced logging for all major operations to track activity and errors.
Polling Timeout:
Added timeouts and error handling to prevent the bot from hanging during long polling.
This updoot is bring more security, robustness, and scalability, ready to handle various edge cases that might occur in our system monitoring.
Signed-off-by: hax hax@lainlounge.xyz
Updoot secure system monitor with service managementto WIP: Updoot secure system monitor with service managementWIP: Updoot secure system monitor with service managementto Updoot secure system monitor with service managementmerged, closing(how tf this works lmao)
Pull request closed