- Move command handler to variable for better flexibility
- Add SendMsg function for sending messages through socket
- Fix missing return statements in command execution
- Improve error handling in monitor exception reporting
Implement a new monitoring system that tracks service status and logs using systemd commands. The monitor includes:
- Periodic status checks via systemctl
- Log analysis via journalctl
- Thread-safe service tracking
- Error detection and reporting