Convert to integration/docker image

so:
- removed addon & bashio dependencies
- added the needed S6 dependency directly instead of via hassioaddons/base:8.0.6
This commit is contained in:
Lysann Schlegel 2023-01-06 22:59:36 +01:00
parent 544172d806
commit 4e2b713065
5 changed files with 95 additions and 11 deletions

View file

@ -0,0 +1,33 @@
#!/bin/bash
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# This script patches all service commands into the appropriate s6- commands
# Why not systemd? Docker said no, so did we ;)
# ==============================================================================
start() {
s6-svc -wU -u -T2500 "/var/run/s6/services/${service}"
}
stop() {
s6-svc -wD -d -T2500 "/var/run/s6/services/${service}"
}
restart() {
stop
start
}
status() {
s6-svstat "/var/run/s6/services/${service}"
}
service="$1"
command="$2"
if [[ ! -d "/var/run/s6/services/${service}" ]] ; then
echo "s6 service not found for ${service}, exiting..."
exit
fi;
${command} "${service}"