From ae849192666cafc7ddffd48c258007feb6a7e776 Mon Sep 17 00:00:00 2001 From: syui Date: Wed, 3 Dec 2025 23:44:46 +0900 Subject: [PATCH] fix --- install.zsh | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/install.zsh b/install.zsh index cf16c6e..225cb85 100755 --- a/install.zsh +++ b/install.zsh @@ -59,7 +59,7 @@ function at-repos-clone() { echo $repo if [ ! -d $d/repos/${repo##*/} ];then git clone $repo - + fi done if [ ! -f $d/repos/feed-generator/Dockerfile ] && [ -f $d/docker/feed/Dockerfile ];then @@ -128,18 +128,18 @@ export const BAPP_CONFIG_URL = null export const GEOLOCATION_CONFIG_URL = BAPP_CONFIG_URL export const DEFAULT_GEOLOCATION_CONFIG: Device['geolocation'] = { - countryCode: undefined, - regionCode: undefined, - ageRestrictedGeos: [], - ageBlockedGeos: [], -} + countryCode: undefined, + regionCode: undefined, + ageRestrictedGeos: [], + ageBlockedGeos: [], + } export const DEFAULT_GEOLOCATION_STATUS: GeolocationStatus = { - countryCode: undefined, - regionCode: undefined, - isAgeRestrictedGeo: false, - isAgeBlockedGeo: false, -} + countryCode: undefined, + regionCode: undefined, + isAgeRestrictedGeo: false, + isAgeBlockedGeo: false, + } GEOEOF # Add null check to geolocation config.ts to prevent fetch(null) errors @@ -271,16 +271,18 @@ function at-repos-build-docker-atproto() { } function at-repos-push-reset() { - docker restart registry - docker stop registry - docker rm registry - docker volume rm registry-data 2>/dev/null || true + if [ -n "$(docker ps -q -f name=registry)" ]; then + echo "Registry is already running." + docker restart registry + docker stop registry + docker rm registry + docker volume rm registry-data 2>/dev/null || true + fi docker run -d -p ${dport}:${dport} --name registry \ --restart=always \ -v registry-data:/var/lib/registry \ registry:2 - sleep 3 - docker run -d -p ${dport}:${dport} --name registry --restart=always registry:2 + fi } function at-repos-push-docker() { @@ -309,7 +311,9 @@ case "`cat /etc/hostname`" in exit ;; *) - at-repos-push-reset + if [ $1 = "r" ];then + at-repos-push-reset + fi at-repos-clone at-repos-pull at-repos-social-app-icon