From b4d6dda2d5d4a14f3792aefe9e5f3b16aa7efd7d Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Wed, 2 Mar 2022 09:39:13 +0100 Subject: [PATCH 1/4] Also upgrade 99.99.99 --- scripts/citadel-os/external-storage/update-from-sdcard | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/citadel-os/external-storage/update-from-sdcard b/scripts/citadel-os/external-storage/update-from-sdcard index 598f26e..a0acbb4 100755 --- a/scripts/citadel-os/external-storage/update-from-sdcard +++ b/scripts/citadel-os/external-storage/update-from-sdcard @@ -40,9 +40,10 @@ main () { local external_version=$(cat "${CITADEL_ROOT}/info.json" | jq -r .version | cut -d "-" -f "1") local sd_version=$(cat "${SD_CITADEL_ROOT}/info.json" | jq -r .version | cut -d "-" -f "1") - if [[ "${external_version}" == "0.5"* ]]; then + if [[ "${external_version}" == "0.5"* ]] || [[ "${external_version}" == "99.99.99" ]]; then echo "External storage is on a pre version number reset version, updating to the latest version." "${CITADEL_ROOT}/scripts/update/update" --path "${SD_CITADEL_ROOT}" + exit 0 fi if ! check_semver_range ">${external_version}" "${sd_version}"; then From b0318359d823093fcb8b9fe89f82b500cbe45175 Mon Sep 17 00:00:00 2001 From: AaronDewes Date: Thu, 3 Mar 2022 14:02:54 +0000 Subject: [PATCH 2/4] Fix network_mode --- app/lib/composegenerator/v2/types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/lib/composegenerator/v2/types.py b/app/lib/composegenerator/v2/types.py index 2654e1f..15d1798 100644 --- a/app/lib/composegenerator/v2/types.py +++ b/app/lib/composegenerator/v2/types.py @@ -47,6 +47,7 @@ class Container: noNetwork: Union[bool, None] = None hiddenServicePorts: Union[dict, Union[int, Union[None, list]]] = field(default_factory=list) environment_allow: list = field(default_factory=list) + network_mode: Union[str, None] = None # Only added later volumes: list = field(default_factory=list) restart: Union[str, None] = None @@ -90,6 +91,7 @@ class ContainerStage2: volumes: list[str] = field(default_factory=list) networks: NetworkConfig = field(default_factory=NetworkConfig) restart: Union[str, None] = None + network_mode: Union[str, None] = None @dataclass class AppStage2: @@ -145,6 +147,7 @@ class ContainerStage4: volumes: list[str] = field(default_factory=list) networks: NetworkConfig = field(default_factory=NetworkConfig) restart: Union[str, None] = None + network_mode: Union[str, None] = None @dataclass class AppStage4: From bf5a848f24ec7ee3a162f6c4ade24f9f612d23cc Mon Sep 17 00:00:00 2001 From: AaronDewes Date: Thu, 3 Mar 2022 14:04:31 +0000 Subject: [PATCH 3/4] Allow updates from 0.0.1 Just to ensure I won't forget with the next update --- info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/info.json b/info.json index 35766d3..0baa821 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "version": "0.0.1", "name": "Citadel 0.0.1", - "requires": ">=0.5.24", + "requires": ">=0.0.1", "notes": "Please note: This update is not compatible with the c-lightning beta. We're resetting version numbers to 0.0.1. This update only contains one bug fix, but please install this update so you'll receive further updates." } From 1491d9d36320408317113f9eef1d47b84fee732d Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Sat, 5 Mar 2022 16:29:53 +0100 Subject: [PATCH 4/4] Allow stopping to fail safely --- scripts/update/01-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update/01-run.sh b/scripts/update/01-run.sh index 1dbdb4d..383ce67 100755 --- a/scripts/update/01-run.sh +++ b/scripts/update/01-run.sh @@ -107,7 +107,7 @@ cat < "$CITADEL_ROOT"/statuses/update-status.json {"state": "installing", "progress": 67, "description": "Stopping old containers", "updateTo": "$RELEASE"} EOF cd "$CITADEL_ROOT" -./scripts/stop +./scripts/stop || true # Overlay home dir structure with new dir tree