Alexandre
2023-05-03 18:16:47 +02:00
parent 3a91acd39d
commit 37880636f0
13 changed files with 1056 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/bash
echo "Starting..."
############################
# Backup Dockerfile Script #
############################
if [ -f /etc/cont-init.d/00-aaa_dockerfile_backup.sh ]; then
chown "$(id -u)":"$(id -g)" /etc/cont-init.d/00-aaa_dockerfile_backup.sh
chmod +x /etc/cont-init.d/00-aaa_dockerfile_backup.sh
/./etc/cont-init.d/00-aaa_dockerfile_backup.sh
rm /etc/cont-init.d/00-aaa_dockerfile_backup.sh
fi
####################
# Starting scripts #
####################
for SCRIPTS in /etc/cont-init.d/*; do
[ -e "$SCRIPTS" ] || continue
echo "$SCRIPTS: executing"
chown "$(id -u)":"$(id -g)" "$SCRIPTS"
chmod a+x "$SCRIPTS"
# Change shebang if no s6 supervision
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"
/."$SCRIPTS" || echo "$SCRIPTS: exiting $?"
done

View File

@@ -0,0 +1,18 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# Create files
CONFIG_LOCATION="/config/addons_config/jellyseer"
bashio::log.info "Config stored in $CONFIG_LOCATION"
mkdir -p "$CONFIG_LOCATION"
cp -rnT /app/config "$CONFIG_LOCATION"
cp -rnT /app /data
rm -r /app
rm -r /data/config
ln -s "$CONFIG_LOCATION" /data/config
# Create files
export JELLYFIN_TYPE=$(bashio::config 'TYPE')
export TZ=$(bashio::config 'TZ')
yarn start