mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-17 21:59:55 +00:00
Add resolveconf config to pihole-FTL.service
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
e8ec0dc701
commit
09886a3f11
@ -20,6 +20,7 @@ is_running() {
|
|||||||
ps "$(get_pid)" > /dev/null 2>&1
|
ps "$(get_pid)" > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Start the service
|
# Start the service
|
||||||
start() {
|
start() {
|
||||||
if is_running; then
|
if is_running; then
|
||||||
@ -34,6 +35,7 @@ start() {
|
|||||||
chown pihole:pihole /etc/pihole /etc/pihole/dhcp.leases /var/log/pihole.log
|
chown pihole:pihole /etc/pihole /etc/pihole/dhcp.leases /var/log/pihole.log
|
||||||
chmod 0644 /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole.log
|
chmod 0644 /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole.log
|
||||||
setcap CAP_NET_BIND_SERVICE=+eip "$(which pihole-FTL)"
|
setcap CAP_NET_BIND_SERVICE=+eip "$(which pihole-FTL)"
|
||||||
|
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.piholeFTL
|
||||||
su -s /bin/sh -c "/usr/bin/pihole-FTL" "$FTLUSER"
|
su -s /bin/sh -c "/usr/bin/pihole-FTL" "$FTLUSER"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
@ -42,6 +44,7 @@ start() {
|
|||||||
# Stop the service
|
# Stop the service
|
||||||
stop() {
|
stop() {
|
||||||
if is_running; then
|
if is_running; then
|
||||||
|
/sbin/resolvconf -d lo.piholeFTL
|
||||||
kill "$(get_pid)"
|
kill "$(get_pid)"
|
||||||
for i in {1..5}; do
|
for i in {1..5}; do
|
||||||
if ! is_running; then
|
if ! is_running; then
|
||||||
|
Loading…
Reference in New Issue
Block a user