mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-09 17:31:03 +01:00
Compare commits
6 Commits
bd323bbfee
...
2d71df0b68
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d71df0b68 | ||
|
|
4a76b61d4e | ||
|
|
c89cf5bf63 | ||
|
|
795b30c78e | ||
|
|
1637b4f3a9 | ||
|
|
5e784ba97d |
@@ -179,7 +179,7 @@ if bashio::config.has_value 'networkdisks'; then
|
||||
|
||||
# Quickly try to mount with defaults
|
||||
if [[ "$FSTYPE" == "cifs" ]]; then
|
||||
mount_drive "rw,file_mode=0775,dir_mode=0775,username=${USERNAME},password=${PASSWORD},nobrl${SMBVERS}${SECVERS}${PUID}${PGID}${CHARSET}${DOMAIN}"
|
||||
mount_drive "rw,file_mode=0775,dir_mode=0775,username=${USERNAME},password=${PASSWORD},nobrl,mfsymlinks${SMBVERS}${SECVERS}${PUID}${PGID}${CHARSET}${DOMAIN}"
|
||||
elif [[ "$FSTYPE" == "nfs" ]]; then
|
||||
mount_drive "rw,nfsvers=4.2,proto=tcp,hard,timeo=600,retrans=2"
|
||||
fi
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
## 10.11.4-1 (07-12-2025)
|
||||
- Avoid deleting the configured data directory when it matches the legacy path while rebuilding symlinks.
|
||||
|
||||
## breaking_versions: 10.11.4 (06-12-2025)
|
||||
- Minor bugs fixed
|
||||
|
||||
|
||||
@@ -125,5 +125,5 @@ schema:
|
||||
slug: jellyfin
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons
|
||||
version: "10.11.4"
|
||||
version: "10.11.4-1"
|
||||
video: true
|
||||
|
||||
@@ -3,6 +3,40 @@
|
||||
set -e
|
||||
|
||||
LOCATION=$(bashio::config 'data_location')
|
||||
PUID=$(bashio::config "PUID")
|
||||
PGID=$(bashio::config "PGID")
|
||||
|
||||
create_link() {
|
||||
local target_dir="$1"
|
||||
local link_path="$2"
|
||||
|
||||
local target_real
|
||||
local link_real
|
||||
|
||||
target_real=$(realpath -m "$target_dir")
|
||||
link_real=$(realpath -m "$link_path")
|
||||
|
||||
mkdir -p "$target_dir"
|
||||
mkdir -p "$(dirname "$link_path")"
|
||||
|
||||
# If the link path is the same as the target, just ensure ownership and exit
|
||||
if [ "$target_real" = "$link_real" ]; then
|
||||
chown -R "$PUID:$PGID" "$target_dir"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -L "$link_path" ]; then
|
||||
rm "$link_path"
|
||||
elif [ -d "$link_path" ]; then
|
||||
cp -a "$link_path/." "$target_dir/" || true
|
||||
rm -r "$link_path"
|
||||
elif [ -e "$link_path" ]; then
|
||||
rm "$link_path"
|
||||
fi
|
||||
|
||||
ln -sfn "$target_dir" "$link_path"
|
||||
chown -R "$PUID:$PGID" "$target_dir"
|
||||
}
|
||||
|
||||
# Check if config is located in an acceptable location
|
||||
LOCATIONOK=""
|
||||
@@ -45,50 +79,25 @@ fi
|
||||
|
||||
# links
|
||||
|
||||
if [ ! -d /jellyfin/cache ]; then
|
||||
echo "Creating link for /jellyfin/cache"
|
||||
mkdir -p "$LOCATION"/cache
|
||||
chown -R "$PUID:$PGID" "$LOCATION"/cache
|
||||
ln -s "$LOCATION"/cache /jellyfin/cache
|
||||
fi
|
||||
echo "Creating link for /jellyfin/cache"
|
||||
create_link "$LOCATION/cache" /jellyfin/cache
|
||||
|
||||
if [ ! -d /jellyfin/data ]; then
|
||||
echo "Creating link for /jellyfin/data"
|
||||
mkdir -p "$LOCATION"/data
|
||||
chown -R "$PUID:$PGID" "$LOCATION"/data
|
||||
ln -s "$LOCATION"/data /jellyfin/data
|
||||
fi
|
||||
echo "Creating link for /jellyfin/data"
|
||||
create_link "$LOCATION/data" /jellyfin/data
|
||||
|
||||
if [ ! -d /jellyfin/log ]; then
|
||||
echo "Creating link for /jellyfin/log"
|
||||
mkdir -p "$LOCATION"/log
|
||||
chown -R "$PUID:$PGID" "$LOCATION"/log
|
||||
ln -s "$LOCATION"/log /jellyfin/log
|
||||
fi
|
||||
echo "Creating link for /jellyfin/log"
|
||||
create_link "$LOCATION/log" /jellyfin/log
|
||||
|
||||
if [ ! -d /jellyfin/metadata ]; then
|
||||
echo "Creating link for /jellyfin/metadata"
|
||||
mkdir -p "$LOCATION"/metadata
|
||||
chown -R "$PUID:$PGID" "$LOCATION"/metadata
|
||||
ln -s "$LOCATION"/metadata /jellyfin/metadata
|
||||
fi
|
||||
echo "Creating link for /jellyfin/metadata"
|
||||
create_link "$LOCATION/metadata" /jellyfin/metadata
|
||||
|
||||
if [ ! -d /jellyfin/plugins ]; then
|
||||
echo "Creating link for /jellyfin/plugins"
|
||||
mkdir -p "$LOCATION"/plugins
|
||||
chown -R "$PUID:$PGID" "$LOCATION"/plugins
|
||||
ln -s "$LOCATION"/plugins /jellyfin/plugins
|
||||
fi
|
||||
echo "Creating link for /jellyfin/plugins"
|
||||
create_link "$LOCATION/plugins" /jellyfin/plugins
|
||||
|
||||
if [ ! -d /jellyfin/root ]; then
|
||||
echo "Creating link for /jellyfin/root"
|
||||
mkdir -p "$LOCATION"/root
|
||||
chown -R "$PUID:$PGID" "$LOCATION"/root
|
||||
ln -s "$LOCATION"/root /jellyfin/root
|
||||
fi
|
||||
echo "Creating link for /jellyfin/root"
|
||||
create_link "$LOCATION/root" /jellyfin/root
|
||||
|
||||
# Legacy mode
|
||||
echo "Enable legacy mode"
|
||||
mkdir -p /config/addons_config
|
||||
ln -sf "$LOCATION" /config/addons_config/jellyfin
|
||||
create_link "$LOCATION" /config/addons_config/jellyfin
|
||||
chown -R "$PUID:$PGID" "$LOCATION"
|
||||
|
||||
@@ -30,8 +30,10 @@ mkdir -p /data/transcodes
|
||||
if [ -d "$LOCATION"/data/transcodes ]; then
|
||||
cp -rT "$LOCATION"/data/transcodes /data/transcodes || true
|
||||
rm -r "$LOCATION"/data/transcodes
|
||||
elif [ -L "$LOCATION"/data/transcodes ]; then
|
||||
rm "$LOCATION"/data/transcodes
|
||||
fi
|
||||
ln -s /data/transcodes "$LOCATION"/data/transcodes
|
||||
ln -sfn /data/transcodes "$LOCATION"/data/transcodes
|
||||
chown -R "$PUID":"$PGID" /data/transcodes
|
||||
|
||||
# Permissions
|
||||
|
||||
Reference in New Issue
Block a user