Fix scripts

This commit is contained in:
pvizeli 2017-03-28 15:38:07 +02:00
parent a73da12dd9
commit ae3e2888a9
4 changed files with 9 additions and 9 deletions

View File

@ -10,7 +10,7 @@ runSupervisor() {
docker rm --force resin_supervisor || true docker rm --force resin_supervisor || true
docker run --privileged --name resin_supervisor \ docker run --privileged --name resin_supervisor \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/hassio_hc.sock:/var/run/hassio-hc.sock \ -v /var/run/hassio-hc.sock:/var/run/hassio-hc.sock \
-v /resin-data:/data \ -v /resin-data:/data \
-v /var/log/supervisor-log:/var/log \ -v /var/log/supervisor-log:/var/log \
-e DOCKER_SOCKET=/var/run/docker.sock \ -e DOCKER_SOCKET=/var/run/docker.sock \

View File

@ -21,29 +21,29 @@ do
continue continue
fi fi
if [ ${parse[0]} == "reboot" ]; then if [ ${parse[0]} == "reboot" ]; then
systemctl reboot systemctl reboot || true
echo "OK" echo "OK"
continue continue
fi fi
if [ ${parse[0]} == "shutdown" ]; then if [ ${parse[0]} == "shutdown" ]; then
systemctl poweroff systemctl poweroff || true
echo "OK" echo "OK"
continue continue
fi fi
if [ ${parse[0]} == "host-update" ]; then if [ ${parse[0]} == "host-update" ]; then
if [ ${parse[@]} -eq 2]; then if [ ${parse[@]} -eq 2]; then
resinhub --hostos-version ${parse[1]} resinhub --hostos-version ${parse[1]} || true
else else
resinhub resinhub || true
fi fi
echo "OK" echo "OK"
continue continue
fi fi
if [ ${parse[0]} == "supevisor-update" ]; then if [ ${parse[0]} == "supevisor-update" ]; then
if [ ${parse[@]} -eq 2]; then if [ ${parse[@]} -eq 2]; then
update-resin-supervisor --supervisor-tag ${parse[1]} update-resin-supervisor --supervisor-tag ${parse[1]} || true
else else
update-resin-supervisor update-resin-supervisor || true
fi fi
echo "OK" echo "OK"
continue continue

View File

@ -5,7 +5,7 @@ Before=resin-supervisor.service
[Service] [Service]
Type=simple Type=simple
ExecStart=@BINDIR@/socat UNIX:/var/run/hassio-hc.sock,fork EXEC:@BINDIR@/hassio-hc ExecStart=@BINDIR@/socat UNIX-LISTEN:/var/run/hassio-hc.sock,fork EXEC:@BINDIR@/hassio-hc
[Install] [Install]
WantedBy=resin.target WantedBy=resin.target

View File

@ -10,7 +10,7 @@
```bash ```bash
docker run --privileged --name resin_supervisor \ docker run --privileged --name resin_supervisor \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/hassio_hc.sock:/var/run/hassio-hc.sock \ -v /var/run/hassio-hc.sock:/var/run/hassio-hc.sock \
-v /resin-data:/data \ -v /resin-data:/data \
-v /var/log/supervisor-log:/var/log \ -v /var/log/supervisor-log:/var/log \
-e DOCKER_SOCKET=/var/run/docker.sock \ -e DOCKER_SOCKET=/var/run/docker.sock \