Travis (#269)
* Update build-all.sh * Delete ovf-create.sh * Update patches.sh * Update hdd-image.sh * Create .travis.yml * Update hdd-image.sh * Update hdd-image.sh * Update hdd-image.sh * Update hdd-image.sh * Update ota.sh * Update post-build.sh * Update post-image.sh * Update rauc.sh * Update rootfs-layer.sh * Update hassos-cli * Update hassos-supervisor * Update hassos-config * Update hassos-apparmor * Update hassos-expand * Update hassos-persists-journald * Update hassos-rate * Update hassos-hook.sh * Update hassos-hook.sh * Rename uboot-boot.sh to uboot-boot.ush * Rename uboot-boot.sh to uboot-boot.ush * Update hassos-hook.sh * Rename uboot-boot.sh to uboot-boot.ush * Rename uboot-boot.sh to uboot-boot.ush * Update hassos-hook.sh * Update odroid_c2_defconfig * Update rpi0_w_defconfig * Update rpi2_defconfig * Update rpi3_64_defconfig * Update rpi3_defconfig * Update rpi_defconfig * Update tinker_defconfig * Update enter.sh * Update .travis.yml
This commit is contained in:
@@ -11,13 +11,14 @@ CLI_DATA=/mnt/data/cli
|
||||
mkdir -p ${CLI_DATA}
|
||||
|
||||
# Run CLI
|
||||
# shellcheck disable=SC2086
|
||||
docker container run \
|
||||
--rm -ti --init \
|
||||
--security-opt apparmor="${APPARMOR}" \
|
||||
-v ${CLI_DATA}:/data \
|
||||
-v /etc/machine-id:/etc/machine-id:ro \
|
||||
$DOCKER_ARGS \
|
||||
${CLI}
|
||||
"${CLI}"
|
||||
|
||||
# Jump to root shell
|
||||
if [ $? -eq 10 ]; then
|
||||
|
||||
@@ -87,9 +87,10 @@ fi
|
||||
##
|
||||
# Firmware update / Only USB
|
||||
UPTIME=$(awk '{printf "%0.f", $1}' /proc/uptime)
|
||||
if ls ${USB_CONFIG}/*.raucb > /dev/null 2>&1 && [ ${UPTIME} -ge 180 ]; then
|
||||
if ls ${USB_CONFIG}/*.raucb > /dev/null 2>&1 && [ "${UPTIME}" -ge "180" ]; then
|
||||
echo "[Info] Performe a firmware update"
|
||||
|
||||
# shellcheck disable=SC2012
|
||||
rauc_filename=$(ls ${USB_CONFIG}/*.raucb | head -n 1)
|
||||
if rauc install "${rauc_filename}"; then
|
||||
echo "[Info] Firmware update success"
|
||||
|
||||
@@ -10,16 +10,18 @@ APPARMOR="$(jq --raw-output '.supervisor_apparmor // "docker-default"' ${CONFIG_
|
||||
|
||||
# Init supervisor
|
||||
HASSOS_DATA=/mnt/data/supervisor
|
||||
HASSOS_IMAGE_ID=$(docker inspect --format='{{.Id}}' ${SUPERVISOR})
|
||||
HASSOS_IMAGE_ID=$(docker inspect --format='{{.Id}}' "${SUPERVISOR}")
|
||||
HASSOS_CONTAINER_ID=$(docker inspect --format='{{.Image}}' hassos_supervisor || echo "")
|
||||
|
||||
# Fix wrong AppArmor profiles
|
||||
if ! grep ${APPARMOR} /sys/kernel/security/apparmor/profiles > /dev/null; then
|
||||
if ! grep "${APPARMOR}" /sys/kernel/security/apparmor/profiles > /dev/null; then
|
||||
APPARMOR=docker-default
|
||||
fi
|
||||
|
||||
runSupervisor() {
|
||||
docker container rm --force hassos_supervisor || true
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker container run --name hassos_supervisor \
|
||||
--security-opt apparmor="${APPARMOR}" \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
@@ -29,7 +31,7 @@ runSupervisor() {
|
||||
-e SUPERVISOR_SHARE=${HASSOS_DATA} \
|
||||
-e SUPERVISOR_NAME=hassos_supervisor \
|
||||
$DOCKER_ARGS \
|
||||
${SUPERVISOR}
|
||||
"${SUPERVISOR}"
|
||||
}
|
||||
|
||||
# Run supervisor
|
||||
|
||||
Reference in New Issue
Block a user