#!/bin/sh # Quick and dirty NRPE script to check if # the local version of Gitea is up to date. # Stop at first uncatched error set -e usage() { cat </dev/null 2>&1; then HOSTADDRESS="[$HOSTADDRESS]" fi ;; \?) usage exit 1 ;; esac done INSTALLED_VERSION="$( wget -O - --header="Host: $HOSTNAME" --no-check-certificate -q "https://$HOSTADDRESS/api/v1/version" | sed -n 's/{"version":"\([^"]\+\)"}/\1/p' )" UPSTREAM_VERSION="$( wget -q -O - "https://dl.gitea.io/gitea/" | egrep -- '