mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-18 14:51:50 +02:00
Update 99-run.sh
This commit is contained in:
@@ -5,17 +5,26 @@ set -e
|
|||||||
#################
|
#################
|
||||||
# Set structure #
|
# Set structure #
|
||||||
#################
|
#################
|
||||||
for folders in config users indexdir database secret media cache thumbnail_cache grampsdb; do
|
for folders in config users indexdir database secret media cache thumbnail_cache db persist; do
|
||||||
mkdir -p /config/"$folders"
|
mkdir -p /config/"$folders"
|
||||||
if [ -d /app/"$folders" ] && [ "$(ls -A /app/"$folders")" ]; then
|
if [ -d /app/"$folders" ] && [ "$(ls -A /app/"$folders")" ]; then
|
||||||
cp -rf /app/"$folders"/* /config/"$folders"
|
cp -rn /app/"$folders"/* /config/"$folders"
|
||||||
fi
|
fi
|
||||||
rm -rf /app/"$folders"
|
rm -rf /app/"$folders"
|
||||||
ln -sf /config/"$folders" /app/"$folders"
|
ln -sf /config/"$folders" /app/"$folders"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for files in /app/dump.rdb; do
|
||||||
|
if [ -f "$files" ]; then
|
||||||
|
cp -n "$files" /config/"$(basename "$files")"
|
||||||
|
fi
|
||||||
|
rm -rf "$files"
|
||||||
|
ln -sf /config/"$(basename "$files")" "$files"
|
||||||
|
done
|
||||||
|
|
||||||
if [ -d /root/.gramps/grampsdb ] && [ "$(ls -A /root/.gramps/grampsdb)" ]; then
|
if [ -d /root/.gramps/grampsdb ] && [ "$(ls -A /root/.gramps/grampsdb)" ]; then
|
||||||
cp -rf /root/.gramps/grampsdb/* /config/grampsdb
|
mkdir -p /config/grampsdb
|
||||||
|
cp -rn /root/.gramps/grampsdb/* /config/grampsdb
|
||||||
rm -rf /root/.gramps/grampsdb
|
rm -rf /root/.gramps/grampsdb
|
||||||
ln -sf /config/grampsdb /root/.gramps/grampsdb
|
ln -sf /config/grampsdb /root/.gramps/grampsdb
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user