mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-21 08:11:50 +02:00
Update 00-folders.sh
This commit is contained in:
@@ -26,12 +26,16 @@ change_folders () {
|
|||||||
grep -rl "$ORIGINALLOCATION" /etc/services.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" /etc/cont-init.d/10-adduser
|
||||||
sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /defaults/*
|
sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /defaults/*
|
||||||
#if [ -f $ORIGINALLOCATION/sync.conf ]; then
|
if [ "$TYPE" = "config_location" ]; then
|
||||||
# sed "s|$(jq -r .storage_path "$ORIGINALLOCATION"/sync.conf)||g" $ORIGINALLOCATION/sync.conf
|
[ -f "$ORIGINALLOCATION"/sync.conf ] && sed "s|$(jq -r .storage_path "$ORIGINALLOCATION"/sync.conf)|$CONFIGLOCATION|g" $ORIGINALLOCATION/sync.conf
|
||||||
#fi
|
[ -f "$CONFIGLOCATION"/sync.conf ] && sed "s|$(jq -r .storage_path "$CONFIGLOCATIONLOCATION"/sync.conf)|$CONFIGLOCATION|g" CONFIGLOCATIONLOCATION/sync.conf
|
||||||
#if [ -f $CONFIGLOCATION/sync.conf ]; then
|
[ -f "/defaults/sync.conf" ] && sed "s|$(jq -r .storage_path "/defaults"/sync.conf)|$CONFIGLOCATION|g" /defaults/sync.conf
|
||||||
# sed "s|||g" $CONFIGLOCATION/sync.conf
|
fi
|
||||||
#fi
|
if [ "$TYPE" = "data_location" ]; then
|
||||||
|
[ -f "$ORIGINALLOCATION"/sync.conf ] && sed "s|$(jq -r .directory_root "$ORIGINALLOCATION"/sync.conf)|$CONFIGLOCATION/|g" $ORIGINALLOCATION/sync.conf
|
||||||
|
[ -f "$CONFIGLOCATION"/sync.conf ] && sed "s|$(jq -r .directory_root "$CONFIGLOCATIONLOCATION"/sync.conf)|$CONFIGLOCATION/|g" CONFIGLOCATIONLOCATION/sync.conf
|
||||||
|
[ -f "/defaults/sync.conf" ] && sed "s|$(jq -r .directory_root "/defaults"/sync.conf)|$CONFIGLOCATION/|g" /defaults/sync.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# Create folders
|
# Create folders
|
||||||
[ ! -d "$CONFIGLOCATION" ] && echo "Creating $CONFIGLOCATION" && mkdir -p "$CONFIGLOCATION"
|
[ ! -d "$CONFIGLOCATION" ] && echo "Creating $CONFIGLOCATION" && mkdir -p "$CONFIGLOCATION"
|
||||||
|
|||||||
Reference in New Issue
Block a user