Add support for safe system reboot and poweroff commands via Telegram reply buttons.
- Should include confirmation dialog before execution
- Use
subprocess.run() with appropriate command:
sudo reboot
sudo poweroff
To test this feature locally, you’ll need to allow your user to run reboot and poweroff via sudo without being prompted for a password.
Add this to your sudoers file (sudo visudo), replacing yourusername and paths if needed:
yourusername ALL=(ALL) NOPASSWD: /sbin/reboot, /sbin/poweroff
You can check paths with:
which reboot
which poweroff
This is required only for local testing - the relevant instructions will be added to the README for users later :)
Add support for safe system reboot and poweroff commands via Telegram reply buttons.
subprocess.run()with appropriate command:sudo rebootsudo poweroffTo test this feature locally, you’ll need to allow your user to run
rebootandpoweroffviasudowithout being prompted for a password.Add this to your sudoers file (
sudo visudo), replacingyourusernameand paths if needed:You can check paths with:
This is required only for local testing - the relevant instructions will be added to the README for users later :)