This commit is contained in:
Alexandre
2023-03-14 21:19:17 +01:00
parent 79dd16c479
commit 0c4db2f5d8
11 changed files with 963 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/bash
echo "Starting..."
####################
# 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,16 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# make directory
mkdir -p /tmp/sponsorblockcast
# Export options as env variables
for var in SBCPOLLINTERVAL SBCSCANINTERVAL SBCCATEGORIES SBCYOUTUBEAPIKEY; do
if bashio::config.has_value "$var"; then
export "$var"="$(bashio::config "$var")"
fi
done
# Starting app
bashio::log.info "Starting app"
/./usr/bin/sponsorblockcast &>/proc/1/fd/1