mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-27 03:03:38 +09:00
24 lines
442 B
Plaintext
24 lines
442 B
Plaintext
#!/usr/bin/with-contenv bash
|
|
|
|
# create folders
|
|
mkdir -p \
|
|
/config/www/{backgrounds,icons}
|
|
|
|
# symlink user config
|
|
|
|
symlinks=( \
|
|
/app/heimdall/storage/app/public/backgrounds \
|
|
/app/heimdall/storage/app/public/icons \
|
|
/app/heimdall/database/app.sqlite )
|
|
|
|
for i in "${symlinks[@]}"
|
|
do
|
|
[[ -e "$i" && ! -L "$i" ]] && rm -rf "$i"
|
|
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
|
|
done
|
|
|
|
# permissions
|
|
chown -R abc:abc \
|
|
/config \
|
|
/app
|