diff --git a/ct/opencloud.sh b/ct/opencloud.sh index 364f781cc..296feb832 100644 --- a/ct/opencloud.sh +++ b/ct/opencloud.sh @@ -29,7 +29,7 @@ function update_script() { exit fi - RELEASE="v6.2.0" + RELEASE="v7.0.0" if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then msg_info "Stopping services" systemctl stop opencloud opencloud-wopi @@ -56,6 +56,15 @@ function update_script() { # STORAGE_USERS_POSIX_WATCH_PATH=' /etc/opencloud/opencloud.env fi + if ! sed -n '/^sharing:/,/^storage_users:/p' /etc/opencloud/opencloud.yaml | grep -q 'service_account'; then + ACCOUNT_ID="$(sed -n '/^activitylog:/,/*.$/p' /etc/opencloud/opencloud.yaml | awk -F'id:' '{print $2}' | tr -d '[:space:]')" + ACCOUNT_SECRET="$(sed -n '/^activitylog:/,/*.$/p' /etc/opencloud/opencloud.yaml | awk -F'secret:' '{print $2}' | tr -d '[:space:]')" + sed -i "/^sharing:/a\\ + service_account:\\ + service_account_id: $ACCOUNT_ID\\ + service_account_secret: $ACCOUNT_SECRET" /etc/opencloud/opencloud.yaml + fi + msg_info "Starting services" systemctl start opencloud opencloud-wopi msg_ok "Started services" diff --git a/install/opencloud-install.sh b/install/opencloud-install.sh index dc72bca78..f91185ece 100644 --- a/install/opencloud-install.sh +++ b/install/opencloud-install.sh @@ -64,7 +64,7 @@ $STD sudo -u cool coolconfig set-admin-password --user=admin --password="$COOLPA echo "$COOLPASS" >~/.coolpass msg_ok "Installed Collabora Online" -fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v6.2.0" "/usr/bin" "opencloud-*-linux-amd64" +fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v7.0.0" "/usr/bin" "opencloud-*-linux-amd64" mv /usr/bin/OpenCloud /usr/bin/opencloud msg_info "Configuring OpenCloud"