mirror of
https://github.com/openwrt/packages.git
synced 2025-02-12 03:28:07 +00:00
On systems using seccomp, the hostapd socket files will be owned by the
'network' user/group ([source][0]). In this case, if wifi-presence is
run as root/root, then it does not have permissions to open the
hostapd socket files. This was discussed in awilliams/wifi-presence#3.
This change allows the process user/group to be specified in
/etc/config/wifi-presence. If no explicit user/group is set, then the
init script will use the owner of the socket files in /var/run/hostapd/
to determine the appropriate process user/group.
[0]: ec6293febc/package/network/services/hostapd/files/wpad.init (L35-L36)
Signed-off-by: Adam Williams <pwnfactory@gmail.com>
56 lines
1.9 KiB
Plaintext
56 lines
1.9 KiB
Plaintext
config wifi-presence main
|
|
## MQTT broker address. Ex: 'tcp://192.168.1.2:1883'
|
|
## Required.
|
|
option mqttAddr ''
|
|
|
|
## MQTT client ID.
|
|
## Defaults to 'wifi-presence.<hostname>'
|
|
# option mqttID ''
|
|
|
|
## MQTT topic prefix.
|
|
## Defaults to 'wifi-presence'
|
|
# option mqttPrefix 'wifi-presence'
|
|
|
|
## MQTT username and password (optional).
|
|
# option mqttUsername ''
|
|
# option mqttPassword ''
|
|
|
|
## Verbose logging output if true.
|
|
## Defaults to false.
|
|
# option verbose 1
|
|
|
|
## Debounce duration (using Go duration syntax). Ex: '5s', '10m', '1s', '0'
|
|
## Time until a client is considered disconnected and MQTT disconnect message
|
|
## is published.
|
|
## Defaults to 10s.
|
|
# option debounce '10s'
|
|
|
|
## Access Point (AP) name. Included in MQTT topic and message payload.
|
|
## Defaults to hostname.
|
|
# option apName 'my-ap-name'
|
|
|
|
## hostapd control interface sockets.
|
|
## Separate multiple sockets using ':'. Ex: '/var/run/hostapd/wlan0:/var/run/hostapd/wlan1'.
|
|
## The hostadp configuration file contains the location where these sockets
|
|
## will be created.
|
|
## Defaults to any Unix socket(s) found in /var/run/hostapd, which is
|
|
## the default hostapd directory.
|
|
# option hostapdSocks ''
|
|
|
|
## Home Assistant options:
|
|
## Publish MQTT auto discovery messages for each configured device.
|
|
## Default is true.
|
|
# option hassAutodiscovery 1
|
|
## Set the MQTT topic prefix used by Home Assistant.
|
|
## Default is 'homeassistant' (also Home Assistant's default value).
|
|
# option hassPrefix 'homeassistant'
|
|
|
|
## Set the user and group that runs the wifi-presence process.
|
|
## This can be useful to change if using seccomp, where the hostapd
|
|
## socket files are owned by the 'network' user and group.
|
|
## Use network / network when seccomp is enabled, otherwise root / root.
|
|
## If unspecified, then the owner of the sockets in the /var/run/hostapd/
|
|
## directory will be used.
|
|
# option runAsUser 'network'
|
|
# option runAsGroup 'network'
|