diff options
| author | Simon Rettberg | 2024-10-08 16:22:17 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2024-10-08 16:22:17 +0200 |
| commit | 882b694e06acd389dd74f7a7d9b70ada0fd218d5 (patch) | |
| tree | 11c95683e56645c498a08378dadf2422cd2d27fb /modules-available/webinterface/hooks | |
| parent | Update phpdoc (diff) | |
| download | slx-admin-882b694e06acd389dd74f7a7d9b70ada0fd218d5.tar.gz slx-admin-882b694e06acd389dd74f7a7d9b70ada0fd218d5.tar.xz slx-admin-882b694e06acd389dd74f7a7d9b70ada0fd218d5.zip | |
[webinterface] Add support for ACME, add option to redirect to cert domain
Diffstat (limited to 'modules-available/webinterface/hooks')
| -rw-r--r-- | modules-available/webinterface/hooks/cron.inc.php | 5 | ||||
| -rw-r--r-- | modules-available/webinterface/hooks/main-warning.inc.php | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/modules-available/webinterface/hooks/cron.inc.php b/modules-available/webinterface/hooks/cron.inc.php new file mode 100644 index 00000000..cc30ed05 --- /dev/null +++ b/modules-available/webinterface/hooks/cron.inc.php @@ -0,0 +1,5 @@ +<?php + +if (mt_rand(1, 36) === 1 && Property::get(WebInterface::PROP_TYPE) === 'acme') { + Acme::renew(); +}
\ No newline at end of file diff --git a/modules-available/webinterface/hooks/main-warning.inc.php b/modules-available/webinterface/hooks/main-warning.inc.php new file mode 100644 index 00000000..88abc002 --- /dev/null +++ b/modules-available/webinterface/hooks/main-warning.inc.php @@ -0,0 +1,8 @@ +<?php + +if (Property::get(WebInterface::PROP_TYPE) === 'acme') { + $err = Acme::getLastError(); + if (!empty($err)) { + Message::addError('webinterface.mw-acme-errors', true); + } +}
\ No newline at end of file |
