mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 00:00:14 +00:00
Use both old and new strings for detecting whether this is a Pi-hole dnsmasq config file
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
a2a7e80007
commit
0efc46260f
2 changed files with 9 additions and 5 deletions
|
@ -20,8 +20,9 @@ source "${regexconverter}"
|
|||
|
||||
basename="pihole"
|
||||
PIHOLE_COMMAND="/usr/local/bin/${basename}"
|
||||
PIHOLE_USER="pihole"
|
||||
PIHOLE_GROUP="pihole"
|
||||
DATABASE_USER="pihole"
|
||||
DATABASE_GROUP="www-data"
|
||||
DATABASE_PERMISSIONS="0660"
|
||||
|
||||
piholeDir="/etc/${basename}"
|
||||
|
||||
|
@ -86,7 +87,8 @@ fi
|
|||
# Generate new sqlite3 file from schema template
|
||||
generate_gravity_database() {
|
||||
sqlite3 "${gravityDBfile}" < "${gravityDBschema}"
|
||||
chown $PIHOLE_USER:$PIHOLE_GROUP "${gravityDBfile}"
|
||||
chown ${DATABASE_USER}:${DATABASE_GROUP} "${piholeDir}" "${gravityDBfile}"
|
||||
chmod ${DATABASE_PERMISSIONS} "${piholeDir}" "${gravityDBfile}"
|
||||
}
|
||||
|
||||
# Import domains from file and store them in the specified database table
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue