mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-06-10 03:56:30 +00:00
Merge branch 'master' of https://github.com/pvizeli/hassio
This commit is contained in:
commit
e91f573eb0
@ -1,2 +1,32 @@
|
|||||||
|
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
|
SRC_URI += " \
|
||||||
|
file://resinhup.sh \
|
||||||
|
file://resinhup.service \
|
||||||
|
"
|
||||||
|
|
||||||
|
SYSTEMD_SERVICE_${PN} += "
|
||||||
|
resinhup.service \
|
||||||
|
resinhup.timer \
|
||||||
|
"
|
||||||
|
|
||||||
|
SYSTEMD_AUTO_ENABLE = "enable"
|
||||||
|
|
||||||
|
FILES_${PN} += " \
|
||||||
|
${systemd_unitdir} \
|
||||||
|
${bindir} \
|
||||||
|
"
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||||
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
install -c -m 0644 ${WORKDIR}/resinhup.service ${D}${systemd_unitdir}/system
|
||||||
|
install -c -m 0644 ${WORKDIR}/resinhup.time ${D}${systemd_unitdir}/system
|
||||||
|
|
||||||
|
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
|
||||||
|
-e 's,@SBINDIR@,${sbindir},g' \
|
||||||
|
-e 's,@BINDIR@,${bindir},g' \
|
||||||
|
${D}${systemd_unitdir}/system/*.service
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Resinhup updater
|
||||||
|
Requires=\
|
||||||
|
docker.service \
|
||||||
|
etc-resin\x2dsupervisor.mount \
|
||||||
|
tmp.mount
|
||||||
|
Wants=\
|
||||||
|
mnt-boot.mount \
|
||||||
|
resin-supervisor.service
|
||||||
|
After=\
|
||||||
|
docker.service \
|
||||||
|
tmp.mount \
|
||||||
|
mnt-boot.mount \
|
||||||
|
etc-resin\x2dsupervisor.mount \
|
||||||
|
resin-supervisor.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=@BASE_BINDIR@/bash @BINDIR@/run-resinhub.sh
|
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Resinhup updater timer
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=15min
|
||||||
|
OnUnitInactiveSec=1d
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -56,7 +56,7 @@ Options:
|
|||||||
$LOGFILE file.
|
$LOGFILE file.
|
||||||
|
|
||||||
--no-reboot
|
--no-reboot
|
||||||
Don't reboot if update is successful. This is useful when debugging.
|
Dont reboot if update is successful. This is useful when debugging.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,17 +116,6 @@ function runPreHacks {
|
|||||||
|
|
||||||
# can't fix label of data partition from container
|
# can't fix label of data partition from container
|
||||||
e2label $DATA_MOUNTPOINT resin-data
|
e2label $DATA_MOUNTPOINT resin-data
|
||||||
|
|
||||||
# Some devices never actually update /etc/timestamp because they are hard-rebooted.
|
|
||||||
# Force a /etc/timestamp update so we don't get into TLS issues.
|
|
||||||
# This assumes that current date is valid - which should be because we can't remotely
|
|
||||||
# update a device with outdated time (vpn would not be available so ssh would not
|
|
||||||
# work).
|
|
||||||
# Only applies on sysvinit systems
|
|
||||||
if [[ $(readlink /sbin/init) == *"sysvinit"* ]]; then
|
|
||||||
log "Save timestamp..."
|
|
||||||
date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test if a version is greater than another
|
# Test if a version is greater than another
|
||||||
@ -296,7 +285,7 @@ log "Running resinhup for version $HOSTOS_VERSION ..."
|
|||||||
RESINHUP_STARTTIME=$(date +%s)
|
RESINHUP_STARTTIME=$(date +%s)
|
||||||
|
|
||||||
# Set options
|
# Set options
|
||||||
RESINHUP_ENV="-e VERSION=$HOSTOS_VERSION -e REMOTE=$DOCKER_REPO/resinos"
|
RESINHUP_ENV="-e VERSION=$HOSTOS_VERSION -e REMOTE=$DOCKER_REPO/hassio"
|
||||||
|
|
||||||
docker run --privileged --rm --net=host $RESINHUP_ENV \
|
docker run --privileged --rm --net=host $RESINHUP_ENV \
|
||||||
-v /:/host \
|
-v /:/host \
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
"supervisor_tag": "20170316",
|
"supervisor_tag": "20170319",
|
||||||
"homeassistant_tag": "0.40.1",
|
"homeassistant_tag": "0.40.1",
|
||||||
|
"hassio_version": "0.1",
|
||||||
|
"resinhup_version": "1.1.1",
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
"supervisor_tag": "20170316",
|
"supervisor_tag": "20170319",
|
||||||
"homeassistant_tag": "0.40.1",
|
"homeassistant_tag": "0.40.1",
|
||||||
|
"hassio_version": "0.1",
|
||||||
|
"resinhup_version": "1.1.1",
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user