New way to install/run supervisor + plugins (#620)

* Use new layout for CLI/Supervisor

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix install script

* Fix config

* Add docs

* Fix shellcheck

* Fix issue

* rename package

* Fix build

* Fix apparmor
This commit is contained in:
Pascal Vizeli
2020-04-21 14:37:25 +02:00
committed by GitHub
parent 48f3045854
commit 45c62716cb
40 changed files with 244 additions and 444 deletions

View File

@@ -1,24 +1,11 @@
#!/bin/sh
# ==============================================================================
# Run logging cli
# ==============================================================================
# Load configs
CONFIG_FILE=/mnt/data/hassos.json
CLI="$(jq --raw-output '.cli' ${CONFIG_FILE})"
DOCKER_ARGS="$(jq --raw-output '.cli_args // empty' ${CONFIG_FILE})"
APPARMOR="$(jq --raw-output '.cli_apparmor // "docker-default"' ${CONFIG_FILE})"
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}"
docker container exec \
-ti hassio_cli \
/usr/bin/cli.sh \
# Jump to root login shell
if [ $? -eq 10 ]; then