From 85bbd261a9451a9f87ae827e907950c53f73d8ef Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 28 Feb 2024 12:30:44 -0800 Subject: [PATCH] Run pre-commit --- docs/widgets/services/openwrt.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/widgets/services/openwrt.md b/docs/widgets/services/openwrt.md index 91327d6b8..3759d2b0c 100644 --- a/docs/widgets/services/openwrt.md +++ b/docs/widgets/services/openwrt.md @@ -28,28 +28,33 @@ Create an ACL named `homepage.json` in `/usr/share/rpcd/acl.d/`, the following p ```json { - "homepage": { - "description": "Homepage widget", - "read": { - "ubus": { - "network.interface.wan": ["status"], - "network.interface.lan": ["status"], - "network.device": ["status"], - "system": ["info"] - } - } - } + "homepage": { + "description": "Homepage widget", + "read": { + "ubus": { + "network.interface.wan": ["status"], + "network.interface.lan": ["status"], + "network.device": ["status"], + "system": ["info"] + } + } + } } ``` -Create a `crypt(5)` password hash using the following command in the OpenWRT shell: + +Create a `crypt(5)` password hash using the following command in the OpenWRT shell: + ```sh uhttpd -m "" ``` + Then add a user that will use the ACL and hashed password in `/etc/config/rpcd`: + ``` config login option username 'homepage' option password '' list read homepage ``` + This username and password will be used in Homepage's services.yaml to grant access.