mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-16 13:51:50 +02:00
symlinks test
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 0.0.6
|
||||||
|
|
||||||
|
- test symlinks
|
||||||
|
|
||||||
## 0.0.5
|
## 0.0.5
|
||||||
|
|
||||||
- attempt at starting start.sh, back to prod image
|
- attempt at starting start.sh, back to prod image
|
||||||
|
|||||||
@@ -111,3 +111,8 @@ LABEL \
|
|||||||
####################
|
####################
|
||||||
# 6 HealthcheckNOT #
|
# 6 HealthcheckNOT #
|
||||||
####################
|
####################
|
||||||
|
# # In the dockerfile Changing hard links if possible
|
||||||
|
# RUN for folder in config db; do \
|
||||||
|
# echo "Adapting hard links" && \
|
||||||
|
# grep -rl "/app/$folder" / 2>/dev/null | xargs sed -i "s|/app/$folder|/config/$folder|g"; \
|
||||||
|
# done
|
||||||
@@ -4,6 +4,22 @@ set -e
|
|||||||
|
|
||||||
bashio::log.warning "App starting."
|
bashio::log.warning "App starting."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# In the addon script, make symlinks on the fly
|
||||||
|
echo "Creating symlinks"
|
||||||
|
for folder in config db; do
|
||||||
|
echo "Creating for $folder"
|
||||||
|
# Create symlinks
|
||||||
|
mkdir -p /config/"$folder"
|
||||||
|
if [ -d /app/"$folder" ] && [ "$(ls -A /app/"$folder")" ]; then
|
||||||
|
cp -rn /app/"$folder"/* /config/"$folder"/
|
||||||
|
fi
|
||||||
|
rm -r /app/"$folder"
|
||||||
|
ln -sf /config/"$folder" /app/"$folder"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# LAUNCH APP #
|
# LAUNCH APP #
|
||||||
##############
|
##############
|
||||||
|
|||||||
Reference in New Issue
Block a user