mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 06:14:07 +02:00
First version https://github.com/alexbelgium/hassio-addons/issues/756
This commit is contained in:
16
sponsorblockcast/rootfs/entrypoint.sh
Normal file
16
sponsorblockcast/rootfs/entrypoint.sh
Normal 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
|
||||
16
sponsorblockcast/rootfs/etc/cont-init.d/99-run.sh
Normal file
16
sponsorblockcast/rootfs/etc/cont-init.d/99-run.sh
Normal 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
|
||||
Reference in New Issue
Block a user