v1pi icon indicating copy to clipboard operation
v1pi copied to clipboard

Add poweroff to cnc.js or landing page

Open jeffeb3 opened this issue 6 years ago • 2 comments

You can't poweroff from cnc.js.

jeffeb3 avatar Jun 29 '19 11:06 jeffeb3

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

Example: title: Reboot commands: sudo reboot

TheKyleJohnson90 avatar Oct 06 '19 04:10 TheKyleJohnson90

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.

heymish avatar Dec 11 '21 08:12 heymish