From a23e80abc15fd4038a54312e811d762de6d1af14 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Fri, 1 Jan 2021 10:28:51 +0100 Subject: [PATCH] server/nextcloud: Delete no longer required install_nextcloud.sh script --- .../nextcloud/templates/install_nextcloud.sh | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100755 roles/server/nextcloud/templates/install_nextcloud.sh diff --git a/roles/server/nextcloud/templates/install_nextcloud.sh b/roles/server/nextcloud/templates/install_nextcloud.sh deleted file mode 100755 index 2233083..0000000 --- a/roles/server/nextcloud/templates/install_nextcloud.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -readonly CHECKSUM_TYPE="sha256"; -readonly CHECKSUM_APP="${CHECKSUM_TYPE}sum"; -readonly GPG_FINGERPRINT="{{ nextcloud_gpg_fingerprint }}"; -readonly NEXTCLOUD_USER="{{ system_user }}"; -readonly NEXTCLOUD_DIR="{{ nextcloud_installation_directory }}"; -readonly NEXTCLOUD_GIT_REPO="{{ nextcloud_source_repo }}"; - -readonly GIT_REPO="https://github.com/nextcloud/server"; -readonly VERSION_REGEX='v\d+(\.\d+)*'; - -set -e; - -gpg --quiet --keyserver eu.pool.sks-keyservers.net --recv "$GPG_FINGERPRINT"; - -function error() { - echo "$@" >&2; -} - -function as() { - sudo -u "$NEXTCLOUD_USER" "$@"; -} - -cd "$NEXTCLOUD_DIR"; - -version="$(curl --silent "$GIT_REPO/releases.atom" - | grep --only-matching --perl-regexp '(?<=\s)' - | grep --only-matching --perl-regexp '(?<=href="'"$GIT_REPO"'/releases/tag/'"$VERSION_REGEX"'(?="/>)' - | sort --reverse --numeric-sort - | head --lines=1)"; -if g verify-tag --raw "$TAG" 2>&1 | grep --fixed-strings "[GNUPG:] VALIDSIG $GPG_FINGERPRINT " > /dev/null; then - as composer update; -else - error "Invalid or missing signature for $TAG"; - exit 1; -fi - -