Skip to content

Commit f1dfe82

Browse files
committed
Symlink config file to make execution within the container easier
1 parent 4ba9777 commit f1dfe82

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

docker.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ fi
88

99
case $1 in
1010
"config")
11-
# Recreate the config file if it doesn't exist
12-
if [ ! -f "/etc/pihole-updatelists/pihole-updatelists.conf" ]; then
13-
cp /etc/pihole-updatelists.conf /etc/pihole-updatelists/pihole-updatelists.conf
11+
# Create the config file if it doesn't exist
12+
if [ ! -f /etc/pihole-updatelists/pihole-updatelists.conf ] && [ -f /etc/pihole-updatelists.conf.base ]; then
13+
cp /etc/pihole-updatelists.conf.base /etc/pihole-updatelists/pihole-updatelists.conf
1414
echo " [i] Created /etc/pihole-updatelists/pihole-updatelists.conf"
1515
fi
1616

install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ if [ "$DOCKER" == 1 ]; then
303303

304304
chmod -v +x /usr/bin/pihole-updatelists.sh
305305
mkdir -vp /etc/pihole-updatelists
306+
mv -v /etc/pihole-updatelists.conf /etc/pihole-updatelists.conf.base
307+
ln -sv /etc/pihole-updatelists/pihole-updatelists.conf /etc/pihole-updatelists.conf
306308

307309
if ! grep -q "pihole-updatelists" /crontab.txt; then
308310
# Use the same schedule string to also have it randomized

0 commit comments

Comments
 (0)