Simplify add-on files (#18)

This commit is contained in:
Joakim Sørensen
2021-09-28 19:18:53 +02:00
committed by GitHub
parent a0ca06a9fb
commit f238f0857b
7 changed files with 11 additions and 29 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/execlineb -S1
# ==============================================================================
# Take down the S6 supervision tree when example fails
# s6-overlay docs: https://github.com/just-containers/s6-overlay
# ==============================================================================
if { s6-test ${1} -ne 0 }
if { s6-test ${1} -ne 256 }

View File

@@ -1,18 +1,19 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Start the example service
# s6-overlay docs: https://github.com/just-containers/s6-overlay
# ==============================================================================
# Add your code here
# Declare variables
declare message
## Get the 'message' key from the user config options.
CONFIG_MESSAGE=$(bashio::config 'message')
message=$(bashio::config 'message')
## Set the message to be printed, defaults to "Hello World..."
PRINT_MESSAGE=${CONFIG_MESSAGE:="Hello World..."}
## Print the message the user supplied
bashio::log.info "${PRINT_MESSAGE}"
## Print the message the user supplied, defaults to "Hello World..."
bashio::log.info "${message:="Hello World..."}"
## Run your program
# exec my_program --with-params