diff options
-rw-r--r-- | conf/distfiles/g.mirrors.extra (renamed from distfiles_mirrors/g.mirrors.extra) | 0 | ||||
-rw-r--r-- | conf/distfiles/mirmon.conf (renamed from distfiles_mirrors/mirmon.conf) | 0 | ||||
-rw-r--r-- | conf/experimental/g.mirrors.extra (renamed from experimental_mirrors/g.mirrors.extra) | 0 | ||||
-rw-r--r-- | conf/experimental/mirmon.conf (renamed from experimental_mirrors/mirmon.conf) | 0 | ||||
-rw-r--r-- | conf/releases/g.mirrors.extra (renamed from releases_mirrors/g.mirrors.extra) | 0 | ||||
-rw-r--r-- | conf/releases/mirmon.conf (renamed from releases_mirrors/mirmon.conf) | 0 | ||||
-rw-r--r-- | conf/rsync/g.mirrors.extra (renamed from rsync_mirrors/g.mirrors.extra) | 0 | ||||
-rw-r--r-- | conf/rsync/mirmon.conf (renamed from rsync_mirrors/mirmon.conf) | 0 | ||||
-rw-r--r-- | conf/snapshots/g.mirrors.extra (renamed from snapshots_mirrors/g.mirrors.extra) | 0 | ||||
-rw-r--r-- | conf/snapshots/mirmon.conf (renamed from snapshots_mirrors/mirmon.conf) | 0 | ||||
-rwxr-xr-x | mirmon-wrapper.sh | 6 | ||||
-rwxr-xr-x | validation/mirror-validate.sh | 15 |
12 files changed, 14 insertions, 7 deletions
diff --git a/distfiles_mirrors/g.mirrors.extra b/conf/distfiles/g.mirrors.extra index 75c3d12..75c3d12 100644 --- a/distfiles_mirrors/g.mirrors.extra +++ b/conf/distfiles/g.mirrors.extra diff --git a/distfiles_mirrors/mirmon.conf b/conf/distfiles/mirmon.conf index ab0cb66..ab0cb66 100644 --- a/distfiles_mirrors/mirmon.conf +++ b/conf/distfiles/mirmon.conf diff --git a/experimental_mirrors/g.mirrors.extra b/conf/experimental/g.mirrors.extra index 75c3d12..75c3d12 100644 --- a/experimental_mirrors/g.mirrors.extra +++ b/conf/experimental/g.mirrors.extra diff --git a/experimental_mirrors/mirmon.conf b/conf/experimental/mirmon.conf index dbce73d..dbce73d 100644 --- a/experimental_mirrors/mirmon.conf +++ b/conf/experimental/mirmon.conf diff --git a/releases_mirrors/g.mirrors.extra b/conf/releases/g.mirrors.extra index 75c3d12..75c3d12 100644 --- a/releases_mirrors/g.mirrors.extra +++ b/conf/releases/g.mirrors.extra diff --git a/releases_mirrors/mirmon.conf b/conf/releases/mirmon.conf index 66201e6..66201e6 100644 --- a/releases_mirrors/mirmon.conf +++ b/conf/releases/mirmon.conf diff --git a/rsync_mirrors/g.mirrors.extra b/conf/rsync/g.mirrors.extra index 75a1939..75a1939 100644 --- a/rsync_mirrors/g.mirrors.extra +++ b/conf/rsync/g.mirrors.extra diff --git a/rsync_mirrors/mirmon.conf b/conf/rsync/mirmon.conf index bc5904d..bc5904d 100644 --- a/rsync_mirrors/mirmon.conf +++ b/conf/rsync/mirmon.conf diff --git a/snapshots_mirrors/g.mirrors.extra b/conf/snapshots/g.mirrors.extra index 75c3d12..75c3d12 100644 --- a/snapshots_mirrors/g.mirrors.extra +++ b/conf/snapshots/g.mirrors.extra diff --git a/snapshots_mirrors/mirmon.conf b/conf/snapshots/mirmon.conf index 41840c0..41840c0 100644 --- a/snapshots_mirrors/mirmon.conf +++ b/conf/snapshots/mirmon.conf diff --git a/mirmon-wrapper.sh b/mirmon-wrapper.sh index 2c50369..4c5570b 100755 --- a/mirmon-wrapper.sh +++ b/mirmon-wrapper.sh @@ -26,13 +26,13 @@ die() { main() { SITEDIR=/var/www/mirrorstats.gentoo.org REPODIR=${SITEDIR}/gentoo-mirrorstats/ - MODEDIR=${REPODIR}/${MODE}_mirrors/ + CONFDIR=${REPODIR}/conf/${MODE}/ VARDIR=${SITEDIR}/var/${MODE} HTDOCS=${SITEDIR}/htdocs/${MODE} MIRMON=$(readlink -f "${SITEDIR}"/mirmon/mirmon) - CONFFILE=$(readlink -f "${MODEDIR}"/mirmon.conf) + CONFFILE=$(readlink -f "${CONFDIR}"/mirmon.conf) VAR_GMIRRORS=${VARDIR}/g.mirrors - EXTRA_MIRRORS=${MODEDIR}/g.mirrors.extra + EXTRA_MIRRORS=${CONFDIR}/g.mirrors.extra # Grab mirrors from the web mkdir -p "${VARDIR}" "${HTDOCS}" || die "Failed to mkdir" diff --git a/validation/mirror-validate.sh b/validation/mirror-validate.sh index e5348ec..8d50ad7 100755 --- a/validation/mirror-validate.sh +++ b/validation/mirror-validate.sh @@ -9,12 +9,19 @@ . /etc/init.d/functions.sh -if [[ $1 != "distfiles" ]] && [[ $1 != "rsync" ]]; then - echo "Need to specify distfiles or rsync" +case $1 in + distfiles) ;; + rsync) ;; + releases) ;; + snapshots) ;; + experimental) ;; + *) + echo "Need to specify valid mode" 1>&2 exit 1 -fi + ;; +esac -STATE_FILE="/var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/$1_mirrors/var/mirmon.state" +STATE_FILE="/var/www/mirrorstats.gentoo.org/var/$1/mirmon.state" count_bad_status() { BAD_STATUS_COUNT=0 |