mirror of
https://github.com/a-stoyanov/zabbix-domain-expiry.git
synced 2025-12-14 18:32:30 +00:00
Merge 339eaf9165 into 9b8e1279fb
This commit is contained in:
commit
61c0647662
1 changed files with 8 additions and 1 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
# Copyright (c) 2009-2016 Elan Ruusamäe <glen@pld-linux.org> (Maintainer)
|
# Copyright (c) 2009-2016 Elan Ruusamäe <glen@pld-linux.org> (Maintainer)
|
||||||
# Zabbix adapted version: https://github.com/a-stoyanov/zabbix-domain-expiry (A.Stoyanov)
|
# Zabbix adapted version: https://github.com/a-stoyanov/zabbix-domain-expiry (A.Stoyanov)
|
||||||
# 20/11/2023 - added '-s|--server' switch logic to accept empty quoted value ""
|
# 20/11/2023 - added '-s|--server' switch logic to accept empty quoted value ""
|
||||||
# 20/11/2023 - changed program exit output to align with zabbix template item pre-processing
|
# 20/11/2023 - changed program exit output to align with zabbix template item pre-processing
|
||||||
|
|
||||||
# fail on first error, do not continue
|
# fail on first error, do not continue
|
||||||
set -e
|
set -e
|
||||||
|
|
@ -447,6 +447,13 @@ get_expiration() {
|
||||||
$0 ~ "expires: *" DATE_YYYY_MM_DD_DASH_HH_MM_SS_TZOFFSET {split($2, a, "-"); printf("%s-%s-%s", a[1], a[2], a[3]); exit}
|
$0 ~ "expires: *" DATE_YYYY_MM_DD_DASH_HH_MM_SS_TZOFFSET {split($2, a, "-"); printf("%s-%s-%s", a[1], a[2], a[3]); exit}
|
||||||
# FIXME: XXX: weak patterns
|
# FIXME: XXX: weak patterns
|
||||||
|
|
||||||
|
# expiration date: 2025.06.24 14:00:00
|
||||||
|
/[Ee]xpiration date:/ && $(NF-1) ~ DATE_YYYY_MM_DD_DOT {
|
||||||
|
split($(NF-1), a, ".");
|
||||||
|
printf("%s-%s-%s", a[1], a[2], a[3]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
# renewal: 31-March-2016
|
# renewal: 31-March-2016
|
||||||
/renewal:/{split($2, a, "-"); printf("%s-%s-%s\n", a[3], month2moy(a[2]), a[1]); exit}
|
/renewal:/{split($2, a, "-"); printf("%s-%s-%s\n", a[3], month2moy(a[2]), a[1]); exit}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue