-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
256 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
Check failure on line 1 in base/build.yaml GitHub Actions / workflows / Lint Add-on
|
||
build_from: | ||
aarch64: ghcr.io/hassio-addons/base:15.0.3 | ||
amd64: ghcr.io/hassio-addons/base:15.0.3 | ||
armv7: ghcr.io/hassio-addons/base:15.0.3 | ||
aarch64: node:18-alpine3.19@sha256:91f3cd192c9f1a1a907b8f53bb8cf737557e6c1bb9dc499a725e48ba6ced58fd | ||
amd64: node:18-alpine3.19@sha256:8842b060b01af71c082cee310b428a2d825e940d9fd9e450e05d726aea66a480 | ||
armv7: node:18-alpine3.19@sha256:62013ecc8888100e31f2e19698756d39e41a53e0047f766c868508701d668715 | ||
codenotary: | ||
signer: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
# ============================================================================== | ||
# Home Assistant Community Add-on: Base Images | ||
# This script patches all service commands into the appropriate s6- commands | ||
# ============================================================================== | ||
|
||
start() { | ||
s6-svc -wU -u -T2500 "/run/service/${service}" | ||
} | ||
|
||
stop() { | ||
s6-svc -wD -d -T2500 "/run/service/${service}" | ||
} | ||
|
||
restart() { | ||
stop | ||
start | ||
} | ||
|
||
status() { | ||
s6-svstat "/run/service/${service}" | ||
} | ||
|
||
service="$1" | ||
command="$2" | ||
|
||
if [[ ! -d "/run/service/${service}" ]] ; then | ||
echo "s6 service not found for ${service}, exiting..." | ||
exit | ||
fi; | ||
|
||
${command} "${service}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/command/with-contenv bashio | ||
# shellcheck shell=bash | ||
# ============================================================================== | ||
# Home Assistant Community Add-on: Base Images | ||
# Displays a simple add-on banner on startup | ||
# ============================================================================== | ||
if bashio::supervisor.ping; then | ||
bashio::log.blue \ | ||
'-----------------------------------------------------------' | ||
bashio::log.blue " Add-on: $(bashio::addon.name)" | ||
bashio::log.blue " $(bashio::addon.description)" | ||
bashio::log.blue \ | ||
'-----------------------------------------------------------' | ||
|
||
bashio::log.blue " Add-on version: $(bashio::addon.version)" | ||
if bashio::var.true "$(bashio::addon.update_available)"; then | ||
bashio::log.magenta ' There is an update available for this add-on!' | ||
bashio::log.magenta \ | ||
" Latest add-on version: $(bashio::addon.version_latest)" | ||
bashio::log.magenta ' Please consider upgrading as soon as possible.' | ||
else | ||
bashio::log.green ' You are running the latest version of this add-on.' | ||
fi | ||
|
||
bashio::log.blue " System: $(bashio::info.operating_system)" \ | ||
" ($(bashio::info.arch) / $(bashio::info.machine))" | ||
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)" | ||
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)" | ||
|
||
bashio::log.blue \ | ||
'-----------------------------------------------------------' | ||
bashio::log.blue \ | ||
' Please, share the above information when looking for help' | ||
bashio::log.blue \ | ||
' or support in, e.g., GitHub, forums or the Discord chat.' | ||
bashio::log.blue \ | ||
'-----------------------------------------------------------' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/command/with-contenv bashio | ||
# shellcheck shell=bash | ||
# ============================================================================== | ||
# Home Assistant Community Add-on: Base Images | ||
# Sets the log level correctly | ||
# ============================================================================== | ||
declare log_level | ||
|
||
# Check if the log level configuration option exists | ||
if bashio::config.exists log_level; then | ||
|
||
# Find the matching LOG_LEVEL | ||
log_level=$(bashio::string.lower "$(bashio::config log_level)") | ||
case "${log_level}" in | ||
all) | ||
log_level="${__BASHIO_LOG_LEVEL_ALL}" | ||
;; | ||
trace) | ||
log_level="${__BASHIO_LOG_LEVEL_TRACE}" | ||
;; | ||
debug) | ||
log_level="${__BASHIO_LOG_LEVEL_DEBUG}" | ||
;; | ||
info) | ||
log_level="${__BASHIO_LOG_LEVEL_INFO}" | ||
;; | ||
notice) | ||
log_level="${__BASHIO_LOG_LEVEL_NOTICE}" | ||
;; | ||
warning) | ||
log_level="${__BASHIO_LOG_LEVEL_WARNING}" | ||
;; | ||
error) | ||
log_level="${__BASHIO_LOG_LEVEL_ERROR}" | ||
;; | ||
fatal) | ||
log_level="${__BASHIO_LOG_LEVEL_FATAL}" | ||
;; | ||
off) | ||
log_level="${__BASHIO_LOG_LEVEL_OFF}" | ||
;; | ||
*) | ||
bashio::exit.nok "Unknown log_level: ${log_level}" | ||
esac | ||
|
||
# Save determined log level so S6 can pick it up later | ||
echo -n "${log_level}" > /var/run/s6/container_environment/LOG_LEVEL | ||
bashio::log.blue "Log level is set to ${__BASHIO_LOG_LEVELS[$log_level]}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/package/admin/s6-overlay/etc/s6-rc/scripts/base-addon-banner |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/package/admin/s6-overlay/etc/s6-rc/scripts/base-addon-log-level |
Empty file.
Empty file.
Empty file.
Empty file.