Commit graph

5 commits

Author SHA1 Message Date
hax
b6792931dc Updoot secure system monitor with service management
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>
2024-10-25 00:29:37 +00:00
hax
ae07a3a86d Particular title removed
As bespoken via VC.

Signed-off-by: hax <hax@lainlounge.xyz>
2024-10-04 19:10:08 +00:00
hax
3bb01a384e Proper README created
Signed-off-by: hax <hax@lainlounge.xyz>
2024-10-04 19:04:46 +00:00
hornet
93c4c0d49e uploaded sou 2024-10-04 18:58:46 +00:00
hornet
d4f7e70d30 Initial commit 2024-10-04 18:55:32 +00:00