mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-29 20:04:05 +02:00
New addon
https://github.com/alexbelgium/hassio-addons/issues/439#issuecomment-1533326052
This commit is contained in:
27
jellyseerr/rootfs/entrypoint.sh
Normal file
27
jellyseerr/rootfs/entrypoint.sh
Normal 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
|
||||
18
jellyseerr/rootfs/etc/cont-init.d/90-run.sh
Normal file
18
jellyseerr/rootfs/etc/cont-init.d/90-run.sh
Normal 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
|
||||
Reference in New Issue
Block a user