Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add poweroff to cnc.js or landing page #6

Open
jeffeb3 opened this issue Jun 29, 2019 · 2 comments
Open

Add poweroff to cnc.js or landing page #6

jeffeb3 opened this issue Jun 29, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jeffeb3
Copy link
Owner

jeffeb3 commented Jun 29, 2019

You can't poweroff from cnc.js.

@jeffeb3 jeffeb3 added the enhancement New feature or request label Jun 29, 2019
@jeffeb3 jeffeb3 self-assigned this Jun 29, 2019
@TheKyleJohnson90
Copy link

You can add these via the Settings -> Commands feature in cncjs.

Example:
title: Reboot
commands: sudo reboot

@heymish
Copy link
Contributor

heymish commented Dec 11, 2021

image

Just needs to add to the .cncrc. I will add a PR for this once the other PR is merged.

,
    "commands": [
    {
      "title": "Reboot",
      "commands": "sudo shutdown -r now"
    },
    {
      "title": "Shutdown",
      "commands": "sudo shutdown -h now"
    }
  ]

It uses the Octopi commands which have been added to /etc/sudoers.d so it all just happily works.

I have tested this. It also works if the Pi user has a password set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants