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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user