This commit is contained in:
Alexandre
2022-02-18 13:06:51 +01:00
parent ed9845962b
commit 3db34e34f2
12 changed files with 50 additions and 41 deletions

View File

@@ -1,5 +1,4 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash # shellcheck shell=bash
# ============================================================================== # ==============================================================================
# Displays a simple add-on banner on startup # Displays a simple add-on banner on startup

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# Define user # Define user
PUID=$(bashio::config "PUID") PUID=$(bashio::config "PUID")

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
LOCATION=$(bashio::config 'data_location') LOCATION=$(bashio::config 'data_location')
@@ -8,64 +9,64 @@ if [ ! -d /jellyfin ]; then
chown -R abc:abc /jellyfin chown -R abc:abc /jellyfin
fi fi
if [ ! -d $LOCATION/tv ]; then if [ ! -d "$LOCATION"/tv ]; then
echo "Creating $LOCATION/tv" echo "Creating "$LOCATION"/tv"
mkdir -p $LOCATION/tv mkdir -p "$LOCATION"/tv
chown -R abc:abc $LOCATION/tv chown -R abc:abc "$LOCATION"/tv
fi fi
if [ ! -d $LOCATION/movies ]; then if [ ! -d "$LOCATION"/movies ]; then
echo "Creating $LOCATION/movies" echo "Creating "$LOCATION"/movies"
mkdir -p $LOCATION/movies mkdir -p "$LOCATION"/movies
chown -R abc:abc $LOCATION/movies chown -R abc:abc "$LOCATION"/movies
fi fi
if [ ! -d $LOCATION ]; then if [ ! -d "$LOCATION" ]; then
echo "Creating $LOCATION" echo "Creating "$LOCATION""
mkdir -p $LOCATION mkdir -p "$LOCATION"
chown -R abc:abc $LOCATION chown -R abc:abc "$LOCATION"
fi fi
# links # links
if [ ! -d /jellyfin/cache ]; then if [ ! -d /jellyfin/cache ]; then
echo "Creating link for /jellyfin/cache" echo "Creating link for /jellyfin/cache"
mkdir -p $LOCATION/cache mkdir -p "$LOCATION"/cache
chown -R abc:abc $LOCATION/cache chown -R abc:abc "$LOCATION"/cache
ln -s $LOCATION/cache /jellyfin/cache ln -s "$LOCATION"/cache /jellyfin/cache
fi fi
if [ ! -d /jellyfin/data ]; then if [ ! -d /jellyfin/data ]; then
echo "Creating link for /jellyfin/data" echo "Creating link for /jellyfin/data"
mkdir -p $LOCATION/data mkdir -p "$LOCATION"/data
chown -R abc:abc $LOCATION/data chown -R abc:abc "$LOCATION"/data
ln -s $LOCATION/data /jellyfin/data ln -s "$LOCATION"/data /jellyfin/data
fi fi
if [ ! -d /jellyfin/logs ]; then if [ ! -d /jellyfin/logs ]; then
echo "Creating link for /jellyfin/logs" echo "Creating link for /jellyfin/logs"
mkdir -p $LOCATION/logs mkdir -p "$LOCATION"/logs
chown -R abc:abc $LOCATION/logs chown -R abc:abc "$LOCATION"/logs
ln -s $LOCATION/logs /jellyfin/logs ln -s "$LOCATION"/logs /jellyfin/logs
fi fi
if [ ! -d /jellyfin/metadata ]; then if [ ! -d /jellyfin/metadata ]; then
echo "Creating link for /jellyfin/metadata" echo "Creating link for /jellyfin/metadata"
mkdir -p $LOCATION/metadata mkdir -p "$LOCATION"/metadata
chown -R abc:abc $LOCATION/metadata chown -R abc:abc "$LOCATION"/metadata
ln -s $LOCATION/metadata /jellyfin/metadata ln -s "$LOCATION"/metadata /jellyfin/metadata
fi fi
if [ ! -d /jellyfin/plugins ]; then if [ ! -d /jellyfin/plugins ]; then
echo "Creating link for /jellyfin/plugins" echo "Creating link for /jellyfin/plugins"
mkdir -p $LOCATION/plugins mkdir -p "$LOCATION"/plugins
chown -R abc:abc $LOCATION/plugins chown -R abc:abc "$LOCATION"/plugins
ln -s $LOCATION/plugins /jellyfin/plugins ln -s "$LOCATION"/plugins /jellyfin/plugins
fi fi
if [ ! -d /jellyfin/root ]; then if [ ! -d /jellyfin/root ]; then
echo "Creating link for /jellyfin/root" echo "Creating link for /jellyfin/root"
mkdir -p $LOCATION/root mkdir -p "$LOCATION"/root
chown -R abc:abc $LOCATION/root chown -R abc:abc "$LOCATION"/root
ln -s $LOCATION/root /jellyfin/root ln -s "$LOCATION"/root /jellyfin/root
fi fi

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# Where is the config # Where is the config
CONFIGSOURCE=$(bashio::config "PMM_CONFIG") CONFIGSOURCE=$(bashio::config "PMM_CONFIG")

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# ============================================================================== # ==============================================================================
# Home Assistant Community Add-on: spotweb # Home Assistant Community Add-on: spotweb
# This file validates config and creates the database # This file validates config and creates the database

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# ============================================================================== # ==============================================================================
# Runs the daily task to check the spotweb cache # Runs the daily task to check the spotweb cache
# ============================================================================== # ==============================================================================

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# ============================================================================== # ==============================================================================
# Runs the hourly task to update spots # Runs the hourly task to update spots
# ============================================================================== # ==============================================================================

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# ============================================================================== # ==============================================================================
# Home Assistant Community Add-on: spotweb # Home Assistant Community Add-on: spotweb
# Runs the Nginx daemon # Runs the Nginx daemon

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
bashio::log.info "Starting PHP-FPM..." bashio::log.info "Starting PHP-FPM..."

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# Define user # Define user
PUID=$(bashio::config "PUID") PUID=$(bashio::config "PUID")

View File

@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash # shellcheck shell=bash
# shellcheck disable=SC2116
# Add Edge repositories # Add Edge repositories
if bashio::config.true 'edge_repositories'; then if bashio::config.true 'edge_repositories'; then