Open jeffeb3 opened 5 years ago
You can add these via the Settings -> Commands feature in cncjs.
Example: title: Reboot commands: sudo reboot
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.
You can't poweroff from cnc.js.