mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-30 01:40:31 +02:00
Update permissions each time
This commit is contained in:
@@ -1,47 +1,32 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
if [ ! -d /emby ]; then
|
bashio::log.info "Updating folder structure and permission"
|
||||||
echo "Creating /emby"
|
|
||||||
mkdir -p /emby
|
|
||||||
chown -R abc:abc /emby
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /share/storage/tv ]; then
|
echo "Internal location : /emby"
|
||||||
echo "Creating /share/storage/tv"
|
mkdir -p /emby
|
||||||
mkdir -p /share/storage/tv
|
chown -R abc:abc /emby
|
||||||
chown -R abc:abc /share/storage/tv
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /share/storage/movies ]; then
|
echo "Files location : /share/storage/tv"
|
||||||
echo "Creating /share/storage/movies"
|
mkdir -p /share/storage/tv
|
||||||
mkdir -p /share/storage/movies
|
chown -R abc:abc /share/storage/tv
|
||||||
chown -R abc:abc /share/storage/movies
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /share/emby ]; then
|
echo "Files location : /share/storage/movies"
|
||||||
echo "Creating /share/emby"
|
mkdir -p /share/storage/movies
|
||||||
mkdir -p /share/emby
|
chown -R abc:abc /share/storage/movies
|
||||||
chown -R abc:abc /share/emby
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /config/emby ] && [ ! -d /config/addons_config/emby ]; then
|
echo "Data location : /share/emby"
|
||||||
echo "Moving to new location /config/addons_config/emby"
|
mkdir -p /share/emby
|
||||||
mkdir -p /config/addons_config/emby
|
chown -R abc:abc /share/emby
|
||||||
chown -R abc:abc /config/addons_config/emby
|
|
||||||
mv /config/emby/* /config/addons_config/emby/
|
|
||||||
rm -r /config/emby
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /config/addons_config/emby ]; then
|
echo "Config location : /config/addons_config/emby"
|
||||||
echo "Creating /config/addons_config/emby"
|
mkdir -p /config/addons_config/emby
|
||||||
mkdir -p /config/addons_config/emby
|
chown -R abc:abc /config/addons_config/emby
|
||||||
chown -R abc:abc /config/addons_config/emby
|
|
||||||
fi
|
|
||||||
|
|
||||||
# links
|
# links
|
||||||
|
|
||||||
if [ ! -d /emby/cache ]; then
|
if [ ! -d /emby/cache ]; then
|
||||||
echo "Creating link for /emby/cache"
|
echo "... link for /emby/cache"
|
||||||
mkdir -p /share/emby/cache
|
mkdir -p /share/emby/cache
|
||||||
chown -R abc:abc /share/emby/cache
|
chown -R abc:abc /share/emby/cache
|
||||||
ln -s /share/emby/cache /emby/cache
|
ln -s /share/emby/cache /emby/cache
|
||||||
@@ -61,7 +46,6 @@ if [ ! -d /emby/data ]; then
|
|||||||
ln -s /share/emby/data /emby/data
|
ln -s /share/emby/data /emby/data
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm /emby/logs
|
|
||||||
if [ ! -d /emby/logs ]; then
|
if [ ! -d /emby/logs ]; then
|
||||||
echo "Creating link for /emby/logs"
|
echo "Creating link for /emby/logs"
|
||||||
mkdir -p /share/emby/logs
|
mkdir -p /share/emby/logs
|
||||||
|
|||||||
Reference in New Issue
Block a user