Commit graph

12 commits

Author SHA1 Message Date
hornet
e52703fe44 fixed authorization issue 2024-12-27 21:34:32 +05:00
hornet
1b52ceb881 Merge branch 'hax-dev' into dev 2024-10-25 18:20:39 +05:00
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
hornet
e68739966a finished /reboot host and /restart host functions, added authorization for actions by telegram ID, added nginx to default services 2024-10-18 18:06:53 +05:00
hornet
0afffee697 new functions(WIP) - /reboot and /restart service 2024-10-17 15:51:21 +05:00
HornetMaidan
29cc8aedd4 horfix #4 (fucking insanity) 2024-10-05 01:38:52 +05:00
HornetMaidan
c0d02bb69a hotfix #3 (MY FUCKING GOD) 2024-10-05 01:32:33 +05:00
HornetMaidan
f45bffd25e hotfix #2 2024-10-05 01:24:00 +05:00
HornetMaidan
5d0ce49d0c hotfix 2024-10-05 01:08:41 +05:00
HornetMaidan
edb0641889 fixed the ping formatting 2024-10-05 00:53:58 +05:00
HornetMaidan
7d157e5136 added tailscale subnet availability check 2024-10-05 00:31:47 +05:00
hornet
93c4c0d49e uploaded sou 2024-10-04 18:58:46 +00:00