pikvm_config_write
Replaces a PiKVM config file over SSH after diff confirmation, creates a backup, validates changes, and restores read-only mode.
Instructions
Replace a PiKVM config file over SSH. Needs one PiKVM.
path: same allowed files as pikvm_config_read. content: the WHOLE new file (read it first with pikvm_config_read, change it, send it all back). The first call shows a diff and does nothing. After the user says yes, call again with confirm=true. The tool makes the disk writable, saves a backup next to the file (.bak-date), writes the file, runs "kvmd -m" to check /etc/kvmd/*.yaml files (and puts the old file back if the check fails), then makes the disk read-only again. restart: optional service to restart after a good write, usually kvmd. A restart of kvmd, kvmd-nginx or kvmd-otg also needs confirm_phrase equal to the service name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| server | No | ||
| confirm | No | ||
| content | Yes | ||
| restart | No | ||
| confirm_phrase | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |