Create 01-custom_script.sh

This commit is contained in:
Alexandre
2022-11-14 22:31:20 +01:00
committed by GitHub
parent aef6e6b1c2
commit 58d6a795bd

View File

@@ -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