mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-28 08:04:11 +02:00
&& chown
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net> Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
parent
4a1bcda6f1
commit
189da82614
@ -139,8 +139,7 @@ gravity_swap_databases() {
|
|||||||
else
|
else
|
||||||
# Check if the backup directory exists
|
# Check if the backup directory exists
|
||||||
if [ ! -d "${gravityBCKdir}" ]; then
|
if [ ! -d "${gravityBCKdir}" ]; then
|
||||||
mkdir -p "${gravityBCKdir}"
|
mkdir -p "${gravityBCKdir}" && chown pihole:pihole "${gravityBCKdir}"
|
||||||
chown pihole:pihole "${gravityBCKdir}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If multiple gravityBCKfile's are present (appended with a number), rotate them
|
# If multiple gravityBCKfile's are present (appended with a number), rotate them
|
||||||
@ -1016,8 +1015,7 @@ migrate_to_listsCache_dir() {
|
|||||||
# If not, we need to migrate the old files to the new directory
|
# If not, we need to migrate the old files to the new directory
|
||||||
local str="Migrating the list's cache directory to new location"
|
local str="Migrating the list's cache directory to new location"
|
||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
mkdir -p "${listsCacheDir}"
|
mkdir -p "${listsCacheDir}" && chown pihole:pihole "${listsCacheDir}"
|
||||||
chown pihole:pihole "${listsCacheDir}"
|
|
||||||
|
|
||||||
# Move the old files to the new directory
|
# Move the old files to the new directory
|
||||||
if mv "${piholeDir}"/list.* "${listsCacheDir}/" 2>/dev/null; then
|
if mv "${piholeDir}"/list.* "${listsCacheDir}/" 2>/dev/null; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user