summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormischa <mischa@rx.high5.nl>2021-01-11 22:20:29 +0100
committermischa <mischa@rx.high5.nl>2021-01-11 22:20:29 +0100
commitedb93e1ca0e2450b81e2af9e30c36977db26140c (patch)
tree3a06199aa04263075f152c4c07ba9ac94f7bc34f
parent596eff218d061671fe7c579f98159271bda124d5 (diff)
removed , from regex for VM fetch
-rwxr-xr-xnotify.pl2
-rw-r--r--templates/email-renewal.txt4
-rw-r--r--vms/vm01.txt2
3 files changed, 6 insertions, 2 deletions
diff --git a/notify.pl b/notify.pl
index 6efd5ab..014417f 100755
--- a/notify.pl
+++ b/notify.pl
@@ -177,7 +177,7 @@ sub renewal {
my $response = HTTP::Tiny->new->get('https://openbsd.amsterdam/index.html');
my $total_donated = $1 if $response->{'content'} =~ /([0-9,]+) donated to the OpenBSD/;
- my $total_vms = $1 if $response->{'content'} =~ /([0-9,]+) VMs deployed/;
+ my $total_vms = $1 if $response->{'content'} =~ /([0-9]+) VMs deployed/;
$response = HTTP::Tiny->new->get('https://openbsd.amsterdam/servers.html');
my $total_hosts = () = $response->{'content'} =~ /(\>Server )/g;
diff --git a/templates/email-renewal.txt b/templates/email-renewal.txt
index 93cc84c..78f6647 100644
--- a/templates/email-renewal.txt
+++ b/templates/email-renewal.txt
@@ -6,6 +6,10 @@ Hi NAME,
Your renewal fee for VMID on SERVER this year is €PAYMENT.
+Total donated: TOTAL_DONATED
+Total VMs deployed: TOTAL_VMS
+Total hosts deployed: TOTAL_HOSTS
+
Mischa
--
diff --git a/vms/vm01.txt b/vms/vm01.txt
index 20f329e..58109a8 100644
--- a/vms/vm01.txt
+++ b/vms/vm01.txt
@@ -1,7 +1,7 @@
mac="fe:e1:ab:dd:73:a4"
ip="192.168.1.1"
owner="testuser1"
-date="2018/11/02"
+date="2018/01/02"
payment="70"
donated=""
name="Test1 User"