mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
fix: auto-fix linting issues
This commit is contained in:
committed by
github-actions[bot]
parent
e5adbd266f
commit
f728166b14
@@ -5,52 +5,52 @@ set -e
|
||||
data_location="${data_location:-/share/emby}"
|
||||
config_location="/config/emby"
|
||||
log() {
|
||||
bashio::log.info "$1"
|
||||
bashio::log.info "$1"
|
||||
}
|
||||
|
||||
log "Updating folder structure and permission : data stored in $data_location"
|
||||
|
||||
declare -A directories=(
|
||||
["/emby"]=""
|
||||
["/share/storage/tv"]=""
|
||||
["/share/storage/movies"]=""
|
||||
["$data_location"]=""
|
||||
["$config_location"]=""
|
||||
["/emby"]=""
|
||||
["/share/storage/tv"]=""
|
||||
["/share/storage/movies"]=""
|
||||
["$data_location"]=""
|
||||
["$config_location"]=""
|
||||
)
|
||||
|
||||
for dir in "${!directories[@]}"; do
|
||||
log "Creating directory: $dir"
|
||||
mkdir -p "$dir"
|
||||
chown -R "$PUID:$PGID" "$dir"
|
||||
log "Creating directory: $dir"
|
||||
mkdir -p "$dir"
|
||||
chown -R "$PUID:$PGID" "$dir"
|
||||
done
|
||||
|
||||
if [ -d /homeassistant/emby ]; then
|
||||
log "Migrate previous config location"
|
||||
cp -rf /homeassistant/emby/* "$config_location"/
|
||||
mv /homeassistant/emby /homeassistant/emby_migrated
|
||||
chown -R "$PUID:$PGID" "$config_location"
|
||||
log "Migrate previous config location"
|
||||
cp -rf /homeassistant/emby/* "$config_location"/
|
||||
mv /homeassistant/emby /homeassistant/emby_migrated
|
||||
chown -R "$PUID:$PGID" "$config_location"
|
||||
fi
|
||||
|
||||
if [ -f /homeassistant/addons_autoscripts/emby-nas.sh ]; then
|
||||
cp -rf /homeassistant/addons_autoscripts/emby-nas.sh "$config_location"/
|
||||
mv /homeassistant/addons_autoscripts/emby-nas.sh /homeassistant/addons_autoscripts/emby-nas_migrated.sh
|
||||
cp -rf /homeassistant/addons_autoscripts/emby-nas.sh "$config_location"/
|
||||
mv /homeassistant/addons_autoscripts/emby-nas.sh /homeassistant/addons_autoscripts/emby-nas_migrated.sh
|
||||
fi
|
||||
|
||||
declare -A links=(
|
||||
["/emby/cache"]="$data_location/cache"
|
||||
["/emby/config"]="$config_location"
|
||||
["/emby/data"]="$data_location/data"
|
||||
["/emby/logs"]="$data_location/logs"
|
||||
["/emby/metadata"]="$data_location/metadata"
|
||||
["/emby/plugins"]="$data_location/plugins"
|
||||
["/emby/root"]="$data_location/root"
|
||||
["/emby/cache"]="$data_location/cache"
|
||||
["/emby/config"]="$config_location"
|
||||
["/emby/data"]="$data_location/data"
|
||||
["/emby/logs"]="$data_location/logs"
|
||||
["/emby/metadata"]="$data_location/metadata"
|
||||
["/emby/plugins"]="$data_location/plugins"
|
||||
["/emby/root"]="$data_location/root"
|
||||
)
|
||||
|
||||
for link in "${!links[@]}"; do
|
||||
if [ ! -d "$link" ]; then
|
||||
log "Creating link for $link"
|
||||
mkdir -p "${links[$link]}"
|
||||
chown -R "$PUID:$PGID" "${links[$link]}"
|
||||
ln -s "${links[$link]}" "$link"
|
||||
fi
|
||||
if [ ! -d "$link" ]; then
|
||||
log "Creating link for $link"
|
||||
mkdir -p "${links[$link]}"
|
||||
chown -R "$PUID:$PGID" "${links[$link]}"
|
||||
ln -s "${links[$link]}" "$link"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -7,7 +7,7 @@ set -e
|
||||
###############
|
||||
|
||||
if bashio::config.true 'silent'; then
|
||||
APPEND=' >/dev/null'
|
||||
sed -i '$s|$|'"$APPEND"'|' /etc/s6-overlay/s6-rc.d/svc-emby/run
|
||||
bashio::log.info 'Silent mode activated, all logs from emby server are hidden. Disable this option if you need to troubleshoot the addon.'
|
||||
APPEND=' >/dev/null'
|
||||
sed -i '$s|$|'"$APPEND"'|' /etc/s6-overlay/s6-rc.d/svc-emby/run
|
||||
bashio::log.info 'Silent mode activated, all logs from emby server are hidden. Disable this option if you need to troubleshoot the addon.'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user