Update 00-folders.sh

This commit is contained in:
Alexandre
2022-05-19 18:03:04 +02:00
committed by GitHub
parent ab03d50f51
commit 139e4dead2

View File

@@ -22,10 +22,10 @@ change_folders () {
# Modify files
echo "Adapting files"
grep -rl "$ORIGINALLOCATION" /etc/cont-init.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g"
grep -rl "$ORIGINALLOCATION" /etc/services.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g"
sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /etc/cont-init.d/10-adduser
sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /defaults/*
grep -rl "$ORIGINALLOCATION" /etc/cont-init.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g" || true
grep -rl "$ORIGINALLOCATION" /etc/services.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g" || true
sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /etc/cont-init.d/10-adduser || true
sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /defaults/* || true
# Adapt sync.conf
for FILE in "$ORIGINALLOCATION/sync.conf" "$CONFIGLOCATION/sync.conf" "/defaults/sync.conf"; do