mirror of https://github.com/pikvm/pikvm.git
Update gpio.md (#838)
* Update gpio.md Fixed the formatting to be included in the bubble * Update gpio.md Adding more examples for clarity
This commit is contained in:
parent
c2c9d39ba6
commit
d362ffa0e6
22
docs/gpio.md
22
docs/gpio.md
|
|
@ -300,10 +300,18 @@ kvmd
|
||||||
|
|
||||||
|
|
||||||
Commands are executed from the user `kvmd`. If you want to run the command as root, then you need to configure `sudo`. Example of the `/etc/sudoers.d/custom_commands`:
|
Commands are executed from the user `kvmd`. If you want to run the command as root, then you need to configure `sudo`. Example of the `/etc/sudoers.d/custom_commands`:
|
||||||
|
|
||||||
|
Granular example
|
||||||
|
|
||||||
```sudoers
|
```sudoers
|
||||||
kvmd ALL=(ALL) NOPASSWD: /usr/bin/reboot
|
kvmd ALL=(ALL) NOPASSWD: /usr/bin/reboot
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NON Granular example (Captures ALL commands)
|
||||||
|
|
||||||
|
```sudoers
|
||||||
|
kvmd ALL=(ALL) NOPASSWD: ALL
|
||||||
|
```
|
||||||
|
|
||||||
Example of the `/etc/kvmd/override.yaml`:
|
Example of the `/etc/kvmd/override.yaml`:
|
||||||
|
|
||||||
|
|
@ -325,16 +333,16 @@ kvmd
|
||||||
- ["reboot_button|confirm|Reboot PiKVM"]
|
- ["reboot_button|confirm|Reboot PiKVM"]
|
||||||
```
|
```
|
||||||
|
|
||||||
An example to help you get started:
|
An example to help you get started:
|
||||||
|
|
||||||
* `cmd: [/usr/bin/sudo, kvmd-otgconf, --disable-function, mass_storage.usb0]`
|
* `cmd: [/usr/bin/sudo, kvmd-otgconf, --disable-function, mass_storage.usb0]`
|
||||||
* `cmd: [(absolute path to sudo, command, flag, flag, absolute path to file]`
|
* `cmd: [(absolute path to sudo, command, flag, flag, absolute path to file]`
|
||||||
|
|
||||||
Then run the following:
|
Then run the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
systemctl restart kvmd
|
systemctl restart kvmd
|
||||||
```
|
```
|
||||||
|
|
||||||
### PWM
|
### PWM
|
||||||
??? note "Click to view"
|
??? note "Click to view"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue