mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-30 12:24:04 +02:00
Create 01-custom_script.sh
This commit is contained in:
13
.templates/01-custom_script.sh
Normal file
13
.templates/01-custom_script.sh
Normal 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user