run FTL as root

Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
This commit is contained in:
Adam Hill 2019-02-03 12:47:37 -06:00 committed by Martin Buchleitner
parent c3bfdfb5de
commit f7f6949c53
1 changed files with 7 additions and 0 deletions

View File

@ -171,9 +171,16 @@ setup_dnsmasq() {
setup_dnsmasq_dns "$dns1" "$dns2"
setup_dnsmasq_interface "$interface"
setup_dnsmasq_listening_behaviour "$dnsmasq_listening_behaviour"
setup_dnsmasq_user "${FTL_USER:-root}"
ProcessDNSSettings
}
setup_dnsmasq_user() {
# Run FTL as root user to avoid SHM issues
FTL_USER="${1}"
sed -i '/^\s*user=/ c\user=root' /etc/dnsmasq.d/01-pihole.conf
}
setup_dnsmasq_hostnames() {
# largely borrowed from automated install/basic-install.sh
local IPV4_ADDRESS="${1}"