This commit is contained in:
pvizeli 2017-03-20 17:15:55 +01:00
parent 23b0d11e57
commit 4a33487477
9 changed files with 16 additions and 35 deletions

View File

@ -13,15 +13,8 @@ SUPERVISOR_TAG = "${HASSIO_SUPERVISOR_TAG}"
TARGET_REPOSITORY = "${SUPERVISOR_REPOSITORY}"
TARGET_TAG = "${SUPERVISOR_TAG}"
SRC_URI += " \
file://hassio.conf \
"
FILES_${PN} += " \
${sysconfdir} \
"
do_install_append () {
install -m 0755 ${WORKDIR}/hassio.conf ${D}${sysconfdir}/
sed -i -e 's:@HOMEASSISTANT_REPOSITORY@:${HOMEASSISTANT_REPOSITORY}:g' ${D}${sysconfdir}/hassio.conf
install -d ${D}${sysconfdir}/resin-supervisor
sed -i -e 's:@HOMEASSISTANT_REPOSITORY@:${HOMEASSISTANT_REPOSITORY}:g' ${D}${sysconfdir}/resin-supervisor/supervisor.conf
sed -i -e 's:@MACHINE@:${MACHINE}:g' ${D}${sysconfdir}/resin-supervisor/supervisor.conf
}

View File

@ -1 +0,0 @@
HOMEASSISTANT_REPOSITORY=@HOMEASSISTANT_REPOSITORY@

View File

@ -1,7 +1,6 @@
#!/bin/sh -e
source /usr/sbin/resin-vars
source /etc/hassio.conf
SUPERVISOR_IMAGE_ID=$(docker inspect --format='{{.Id}}' $SUPERVISOR_IMAGE)
SUPERVISOR_CONTAINER_IMAGE_ID=$(docker inspect --format='{{.Image}}' resin_supervisor || echo "")

View File

@ -0,0 +1,5 @@
SUPERVISOR_IMAGE=@SUPERVISOR_REPOSITORY@
SUPERVISOR_TAG=@SUPERVISOR_TAG@
LED_FILE=@LED_FILE@
MACHINE=@MACHINE@
HOMEASSISTANT_REPOSITORY=@HOMEASSISTANT_REPOSITORY@

View File

@ -1,15 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://resinhub.conf \
"
FILES_${PN} += " \
${sysconfdir} \
"
do_install_append () {
install -m 0755 ${WORKDIR}/resinhub.conf ${D}${sysconfdir}/
sed -i -e 's:@RESINHUB_MACHINE@:${MACHINE}:g' ${D}${sysconfdir}/resinhub.conf
}

View File

@ -1 +0,0 @@
RESINHUB_MACHINE=@RESINHUB_MACHINE@

View File

@ -0,0 +1,2 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

View File

@ -235,10 +235,9 @@ else
fi
# Detect slug
source /etc/resinhub.conf
slug=$RESINHUB_MACHINE
slug=$MACHINE
if [ -z $slug ]; then
log ERROR "Can't detect slug from /etc/resinhub.conf"
log ERROR "Can't detect slug from /etc/resin-supervisor/supervisor.conf ."
else
log "Detected slug: $slug ."
fi

View File

@ -14,7 +14,7 @@ ENV LANG C.UTF-8
RUN apk add --no-cache python3 git
# install aiohttp
RUN pip3 install pip --no-cache --upgrade \
&& pip3 install --no-cache aiohttp \
&& pip3 install --no-cache docker \
&& pip3 install --no-cache colorlog
RUN pip3 install pip --no-cache-dir --upgrade \
&& pip3 install --no-cache-dir aiohttp \
&& pip3 install --no-cache-dir docker \
&& pip3 install --no-cache-dir colorlog