1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Set API struct, remove supervisor from host network

This commit is contained in:
Pascal Vizeli
2017-03-18 22:13:45 +01:00
parent d12ab70f90
commit cf92e6cd2d
3 changed files with 21 additions and 2 deletions

20
hassio_api/README.md Normal file
View File

@@ -0,0 +1,20 @@
# HassIO Server
## REST API
### /supervisor
- GET: Return running version back
- PUT: Read last avilable version and write it to ResinOS config
### /homeassistant
- GET: get avilable version
- PUT: performe homeassistant update
### /addons
- GET: get list of avilable addons and installed addons back
- PUT: get or performe a update of a addon
- POST: install a addon
- DEL: remove a addon

View File

@@ -8,7 +8,6 @@ SUPERVISOR_CONTAINER_IMAGE_ID=$(docker inspect --format='{{.Image}}' resin_super
runSupervisor() {
docker rm --force resin_supervisor || true
docker run --privileged --name resin_supervisor \
--net=host \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $CONFIG_PATH:/boot/config.json \
-v /resin-data/resin-supervisor:/data \

View File

@@ -78,7 +78,7 @@ else
error_handler $LINENO "no container engine detected"
fi
request=$(curl $API_ENDPOINT/update_supervisor | jq -e -r '.message')
request=$(curl -X PUT $API_ENDPOINT/supervisor | jq -e -r '.message')
if [ request != "ok" ]; then
error_handler $LINENO $request
fi