Skip to content

feat: reboot and shutdown buttons #9

Description

@by-cortex

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 :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions