summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--backup-lo.crt22
-rwxr-xr-xlo-status16
3 files changed, 39 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1e9d01f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+credentials.gpg
diff --git a/backup-lo.crt b/backup-lo.crt
new file mode 100644
index 0000000..1c415b8
--- /dev/null
+++ b/backup-lo.crt
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDqzCCApOgAwIBAgIUMv1ZmiomLyOilULBDd244GAQ0oYwDQYJKoZIhvcNAQEL
+BQAwZTELMAkGA1UEBhMCREUxEjAQBgNVBAgMCVRodXJpbmdpYTENMAsGA1UEBwwE
+SmVuYTEPMA0GA1UECgwGRWNrbmVyMSIwIAYDVQQDDBliYWNrdXAtbG8uZGRucy5l
+Y2tuZXIubmV0MB4XDTE5MDExMjIwMTgwMFoXDTI5MDEwOTIwMTgwMFowZTELMAkG
+A1UEBhMCREUxEjAQBgNVBAgMCVRodXJpbmdpYTENMAsGA1UEBwwESmVuYTEPMA0G
+A1UECgwGRWNrbmVyMSIwIAYDVQQDDBliYWNrdXAtbG8uZGRucy5lY2tuZXIubmV0
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxUIWMEKzzRnpjPNKLcie
+CjpxaPl+LbSrBEYqbaccRUgw4rRF8hAyHr/Ha00PVvuC5aMSKsDCKWQi6AbL0+EE
+t6IIXHMH7QCzzU7lz3SNu41yi+ay5yqbPjfrmtuMQNbgWNVYvnu98Q8F3gZSImnz
+OfNv4cUNsQdrGn//10PJZiPQ14a5uSXhgW6tGCjB8FpLNT5kEOOYc0zcxkunKPhd
+8sFxs611MPhrYLwJ8bRghsQjq3+PnrpHeEim2Q46zYRswz4optjuByt+QevAVqUu
+/rzC4vqoLGSgbXiiaxrdmvclQdvt52NBaSDOBnus9abRBTo84MZ1sFy/t+H9cUOv
+KQIDAQABo1MwUTAdBgNVHQ4EFgQUj1mjIMv9eXiDG7UEQij7zItAjqwwHwYDVR0j
+BBgwFoAUj1mjIMv9eXiDG7UEQij7zItAjqwwDwYDVR0TAQH/BAUwAwEB/zANBgkq
+hkiG9w0BAQsFAAOCAQEAkERaPjpLJKY3Pv7zB3aWpu1rCJDd2GjqAmQRJxrWuDw4
+EekNKPLvOYq7qN4A3Q7qrmJksp/OGUJOS2vPu+tw5NqaI8lPIbfMkYYUw4h57adD
+2EUH+vu2zpLfpIqgbo05bNJELCRKgPQKPjwTT7MycPUWh8mrv6iczuPeFFN+EseC
+lgQdkfVxT0LYLK51R7/4Ly5NGmqsTU+a/YAYMEJ91d2C1nMqmgFTIXb+TCngOQ11
+olECY1+w/BCgfKUH1ej2R8z7e4VLaGqayj00qIvMvwm0CrEqta3Id3DyQO61dejT
+hYwKWiyhQkDM3vbWnRlxgDRaxJnMYaZxGBOEdvh/Vg==
+-----END CERTIFICATE-----
diff --git a/lo-status b/lo-status
new file mode 100755
index 0000000..5abf9a7
--- /dev/null
+++ b/lo-status
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+cd "$(dirname "$0")"
+
+curl \
+ -Ss \
+ --resolve backup-lo.ddns.eckner.net:443:backup-lo.vpn.ddns.eckner.net:443 \
+ 'https://backup-lo.ddns.eckner.net/chassis.html' \
+ --cacert backup-lo.crt \
+ --digest \
+ --user "$(gpg -d -o - credentials.gpg 2>/dev/null)" \
+| sed '
+ s,^.*<TR><TD><STRONG>Power Status:</STRONG></TD><TD>\([^<>]*\)</TD></TR>.*$,\1,
+ t
+ d
+'