Skip to content

Commit

Permalink
🇨🇳 hassio for china
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Jan 16, 2025
1 parent ab17cdf commit 902a0a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions homeassistant-supervised/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARCH=$(uname -m)

BINARY_DOCKER=/usr/bin/docker

DOCKER_REPO="ghcr.nju.edu.cn/home-assistant"
DOCKER_REPO="ghcr.nju.edu.cn/hasscc"

SERVICE_DOCKER="docker.service"
SERVICE_NM="NetworkManager.service"
Expand All @@ -22,7 +22,7 @@ URL_APPARMOR_PROFILE="https://version.home-assistant.io/apparmor.txt"
if [ -n "$DOCKER_STORAGE_DRIVER" ]; then
sed -i "s@\:\s*\"overlay2\"@\: \"$DOCKER_STORAGE_DRIVER\"@g" /etc/docker/daemon.json
fi
cat /etc/docker/daemon.* >> /tmp/hassio.log
cat /etc/docker/daemon.json >> /tmp/hassio.log

# reload systemd
info "Reload systemd"
Expand Down
13 changes: 0 additions & 13 deletions homeassistant-supervised/usr/sbin/hassio-supervisor
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,4 @@ fi
mkdir -p ${SUPERVISOR_DATA}
echo "[INFO] Starting the Supervisor..."
docker container start hassio_supervisor

if [ ! -f "${SUPERVISOR_DATA}/updater.json" ]; then
images="$(curl -s --location https://version.home-assistant.io/stable.json | jq -e -r '.images')"
cat > "${SUPERVISOR_DATA}/updater.json" <<- EOF
{
"channel": "stable",
"image": ${images}
}
EOF
sed -i 's@"core":@"homeassistant":@g' "${SUPERVISOR_DATA}/updater.json"
fi
sed -i "s@ghcr.io/@ghcr.nju.edu.cn/@g" "${SUPERVISOR_DATA}/updater.json"
exec docker container wait hassio_supervisor

0 comments on commit 902a0a9

Please sign in to comment.