From 58d6a795bd1e5596de26f9fc37dd9080b258f174 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 14 Nov 2022 22:31:20 +0100 Subject: [PATCH] Create 01-custom_script.sh --- .templates/01-custom_script.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .templates/01-custom_script.sh diff --git a/.templates/01-custom_script.sh b/.templates/01-custom_script.sh new file mode 100644 index 000000000..cb9ea5817 --- /dev/null +++ b/.templates/01-custom_script.sh @@ -0,0 +1,13 @@ +#!/usr/bin/with-contenv bashio +# shellcheck shell=bash + +slug="${HOSTNAME#*-}" +bashio::log.info "Execute if existing custom script /config/${slug}.sh" + +if [ -f /config/${slug}.sh ]; then + chmod +x /config/"${slug}".sh + /./config/"${slug}".sh +else + bashio::log.info "... no script found" +fi +