File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
build/opt/init-wrapper/post-init.d Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ docker volume create hass_super_docker
3838# 运行容器
3939docker run -d \
4040 --name hass-super \
41- -v /opt/hassio:/var/lib/homeassistant \
41+ -v /opt/hassio:/var/lib/homeassistant:shared \
4242 -v /run/dbus:/run/dbus:ro \
4343 -v hass_super_docker:/var/lib/docker \
4444 -e DEFAULT_TZ=Asia/Shanghai \
Original file line number Diff line number Diff line change 1313env >> /tmp/hassio.log
1414
1515echo " DATA_SHARE=${DATA_SHARE:=/ var/ lib/ homeassistant} "
16+ mount --make-shared " $DATA_SHARE " >> /tmp/hassio.log 2>&1
1617if [ -f " $DATA_SHARE /updater.json" ]; then
1718 sed -i ' s|ghcr\.io/|ghcr.nju.edu.cn/|g' " $DATA_SHARE /updater.json"
1819 sed -i ' s|/home-assistant/\(.*-hassio-supervisor\)|/hasscc/\1|g' " $DATA_SHARE /updater.json"
1920fi
21+ if [ -f " $DATA_SHARE /config.json" ]; then
22+ sed -i ' s|ghcr\.io/home-assistant|ghcr.nju.edu.cn/hasscc|g' " $DATA_SHARE /config.json"
23+ fi
2024
2125deb=" /opt/hassio.deb"
2226if [ $( cat /etc/timezone) = " Asia/Shanghai" ]; then
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ services:
44 image : ghcr.nju.edu.cn/hasscc/hass-super
55 restart : unless-stopped
66 volumes :
7- - .:/var/lib/homeassistant
7+ - .:/var/lib/homeassistant:shared
88 - /run/dbus:/run/dbus:ro
99 - docker_lib:/var/lib/docker
1010 environment :
You can’t perform that action at this time.
0 commit comments