mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-26 02:26:30 +00:00
Fix scripts
This commit is contained in:
parent
a73da12dd9
commit
ae3e2888a9
@ -10,7 +10,7 @@ runSupervisor() {
|
||||
docker rm --force resin_supervisor || true
|
||||
docker run --privileged --name resin_supervisor \
|
||||
-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 /var/log/supervisor-log:/var/log \
|
||||
-e DOCKER_SOCKET=/var/run/docker.sock \
|
||||
|
@ -21,29 +21,29 @@ do
|
||||
continue
|
||||
fi
|
||||
if [ ${parse[0]} == "reboot" ]; then
|
||||
systemctl reboot
|
||||
systemctl reboot || true
|
||||
echo "OK"
|
||||
continue
|
||||
fi
|
||||
if [ ${parse[0]} == "shutdown" ]; then
|
||||
systemctl poweroff
|
||||
systemctl poweroff || true
|
||||
echo "OK"
|
||||
continue
|
||||
fi
|
||||
if [ ${parse[0]} == "host-update" ]; then
|
||||
if [ ${parse[@]} -eq 2]; then
|
||||
resinhub --hostos-version ${parse[1]}
|
||||
resinhub --hostos-version ${parse[1]} || true
|
||||
else
|
||||
resinhub
|
||||
resinhub || true
|
||||
fi
|
||||
echo "OK"
|
||||
continue
|
||||
fi
|
||||
if [ ${parse[0]} == "supevisor-update" ]; then
|
||||
if [ ${parse[@]} -eq 2]; then
|
||||
update-resin-supervisor --supervisor-tag ${parse[1]}
|
||||
update-resin-supervisor --supervisor-tag ${parse[1]} || true
|
||||
else
|
||||
update-resin-supervisor
|
||||
update-resin-supervisor || true
|
||||
fi
|
||||
echo "OK"
|
||||
continue
|
||||
|
@ -5,7 +5,7 @@ Before=resin-supervisor.service
|
||||
|
||||
[Service]
|
||||
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]
|
||||
WantedBy=resin.target
|
||||
|
@ -10,7 +10,7 @@
|
||||
```bash
|
||||
docker run --privileged --name resin_supervisor \
|
||||
-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 /var/log/supervisor-log:/var/log \
|
||||
-e DOCKER_SOCKET=/var/run/docker.sock \
|
||||
|
Loading…
x
Reference in New Issue
Block a user