mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Revert to ls274 code
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
##################
|
||||
@@ -15,12 +14,14 @@ fi
|
||||
|
||||
if [ -d "/config/Library/Application Support/Plex Media Server" ]; then
|
||||
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"
|
||||
fi || true
|
||||
fi
|
||||
|
||||
if [ ! -d "/config/Library/Application Support" ]; then
|
||||
echo "... creating /symlink"
|
||||
mkdir -p "/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 #
|
||||
@@ -20,13 +20,6 @@ else
|
||||
echo "Using existing config"
|
||||
fi
|
||||
|
||||
PUID="$(bashio::config 'PUID')"
|
||||
PGID="$(bashio::config 'PGID')"
|
||||
|
||||
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"
|
||||
chown -R "$PUID:$PGID" /config/Library
|
||||
chown -R "$PUID:$PGID" /share/plex
|
||||
chmod -R 777 /share/plex
|
||||
|
||||
Reference in New Issue
Block a user