summaryrefslogtreecommitdiff
path: root/roles/nextcloud/files
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-12-23 23:43:43 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-12-23 23:43:43 +0100
commit416b590f88aea107a269f6a014e2519218852c78 (patch)
treeb7e0b66f8b93bda561f4fa6e087ed78cb2ce0863 /roles/nextcloud/files
parentfix network config of atlas based vms (diff)
nextcloud: upgrade all instances and add occ script
Diffstat (limited to 'roles/nextcloud/files')
-rwxr-xr-xroles/nextcloud/files/nextcloud-upgrade42
1 files changed, 0 insertions, 42 deletions
diff --git a/roles/nextcloud/files/nextcloud-upgrade b/roles/nextcloud/files/nextcloud-upgrade
deleted file mode 100755
index aac5001f..00000000
--- a/roles/nextcloud/files/nextcloud-upgrade
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-INST_NAME="$1"
-VERSION="$2"
-if [ -z "$INST_NAME" ] || [ -z "$VERSION" ]; then
- echo "Usage: $0 <instance> <version>"
- exit 1
-fi
-
-set -eu
-
-K8S_MANIFEST_D="/etc/kubernetes/manifests/"
-K8S_MANIFEST_FILE="$K8S_MANIFEST_D/nextcloud-$INST_NAME.yml"
-if [ ! -e "$K8S_MANIFEST_FILE" ]; then
- echo "could not find manifest file: $K8S_MANIFEST_FILE"
- exit 2
-fi
-
-TMP_D=$(mktemp -d -t nextcloud-upgrade.XXXXXXX)
-function cleanup {
- rm -rf "$TMP_D"
-}
-trap cleanup EXIT
-
-echo "*** Pre-Pulling the image"
-echo ""
-ctr -n k8s.io image pull "docker.io/library/nextcloud:$VERSION"
-echo ""
-
-echo "*** Patching manifest file"
-echo ""
-sed "s#image: \"nextcloud:.*\"#image: \"nextcloud:$VERSION\"#" "$K8S_MANIFEST_FILE" > "$TMP_D/upgraded.yml"
-set +e
-diff -u "$K8S_MANIFEST_FILE" "$TMP_D/upgraded.yml"
-if [ $? -eq 0 ]; then
- echo "patching file failed?"
- exit 2
-fi
-cat "$TMP_D/upgraded.yml" > "$K8S_MANIFEST_FILE"
-echo ""
-
-exit 0