mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Revert to ls274 code
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/bin/bash
|
||||||
# shellcheck shell=bash
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
##################
|
##################
|
||||||
@@ -15,12 +14,14 @@ fi
|
|||||||
|
|
||||||
if [ -d "/config/Library/Application Support/Plex Media Server" ]; then
|
if [ -d "/config/Library/Application Support/Plex Media Server" ]; then
|
||||||
echo "... creating /symlink"
|
echo "... creating /symlink"
|
||||||
rm -r "/config/Library/Application Support/*" 2>/dev/null || true
|
rm -r "/config/Library/Application Support/*"
|
||||||
ln -s "/share/plex/Plex Media Server" "/config/Library/Application Support"
|
ln -s "/share/plex/Plex Media Server" "/config/Library/Application Support"
|
||||||
fi || true
|
fi
|
||||||
|
|
||||||
if [ ! -d "/config/Library/Application Support" ]; then
|
if [ ! -d "/config/Library/Application Support" ]; then
|
||||||
echo "... creating /symlink"
|
echo "... creating /symlink"
|
||||||
mkdir -p "/config/Library/Application Support"
|
mkdir -p "/config/Library/Application Support"
|
||||||
ln -s "/share/plex/Plex Media Server" "/config/Library/Application Support"
|
ln -s "/share/plex/Plex Media Server" "/config/Library/Application Support"
|
||||||
fi || true
|
fi
|
||||||
|
|
||||||
|
chown -R "$PUID:$PGID" /share/plex
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bashio
|
#!/bin/bash
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# SYMLINK CONFIG #
|
# SYMLINK CONFIG #
|
||||||
@@ -20,13 +20,6 @@ else
|
|||||||
echo "Using existing config"
|
echo "Using existing config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PUID="$(bashio::config 'PUID')"
|
chown -R "$PUID:$PGID" /config/Library
|
||||||
PGID="$(bashio::config 'PGID')"
|
chown -R "$PUID:$PGID" /share/plex
|
||||||
|
chmod -R 777 /share/plex
|
||||||
if ! bashio::config.true "skip_permissions_check" && [ "${PUID:-0}" != "0" ] && [ "${PGID:-0}" != "0" ]; then
|
|
||||||
bashio::log.info "Starting permissions update"
|
|
||||||
chown -R "${PUID}:${PGID}" /share/plex
|
|
||||||
chmod -R 777 /share/plex
|
|
||||||
fi
|
|
||||||
|
|
||||||
bashio::log.info "Starting upstream code, please wait"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user