mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Documentation: fix openwrt docs (#3016)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
e92ccc30ba
commit
f0910a9e8b
@ -26,29 +26,35 @@ In order for homepage to access the OpenWRT RPC endpoints you will need to [crea
|
|||||||
|
|
||||||
Create an ACL named `homepage.json` in `/usr/share/rpcd/acl.d/`, the following permissions will suffice:
|
Create an ACL named `homepage.json` in `/usr/share/rpcd/acl.d/`, the following permissions will suffice:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"homepage": {
|
"homepage": {
|
||||||
"description": "Homepage widget",
|
"description": "Homepage widget",
|
||||||
"read": {
|
"read": {
|
||||||
"ubus": {
|
"ubus": {
|
||||||
"network.interface.wan": ["status"],
|
"network.interface.wan": ["status"],
|
||||||
"network.interface.lan": ["status"],
|
"network.interface.lan": ["status"],
|
||||||
"network.device": ["status"]
|
"network.device": ["status"],
|
||||||
"system": ["info"]
|
"system": ["info"]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Then add a user that will use that ACL in `/etc/config/rpc`:
|
Create a `crypt(5)` password hash using the following command in the OpenWRT shell:
|
||||||
|
|
||||||
```config login
|
```sh
|
||||||
|
uhttpd -m "<somepassphrase>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add a user that will use the ACL and hashed password in `/etc/config/rpcd`:
|
||||||
|
|
||||||
|
```
|
||||||
|
config login
|
||||||
option username 'homepage'
|
option username 'homepage'
|
||||||
option password '<password>'
|
option password '<hashedpassword>'
|
||||||
list read homepage
|
list read homepage
|
||||||
list write '*'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This username and password will be used in Homepage's services.yaml to grant access.
|
This username and password will be used in Homepage's services.yaml to grant access.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user