summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2022-03-03 18:00:09 -0800
committerIvan Kohler <ivan@freeside.biz>2022-03-03 18:00:09 -0800
commit474e879c6c47d23aa155d6f4b9c7a51b8badf8d9 (patch)
tree2c5bf52b36fad013a7416860abaa1e33224b2f45 /httemplate
parent0d43df4e3b41cbd964d7ca32ac07d9f13a2b0a1d (diff)
show a warning when the OS goes EOL
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/header-full.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/httemplate/elements/header-full.html b/httemplate/elements/header-full.html
index 5a5db9620..a56e0b183 100644
--- a/httemplate/elements/header-full.html
+++ b/httemplate/elements/header-full.html
@@ -96,6 +96,14 @@ Example:
<BR></FONT>
</td>
</tr>
+% foreach my $top_warning ( @top_warnings ) {
+ <TR>
+ <TD COLSPAN=4>
+ <IMG SRC="<% $fsurl %>images/error.png">
+ <FONT COLOR="#FF0000" SIZE="+1"><% $top_warning %></FONT>
+ </TD>
+ </TR>
+% }
</table>
<TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
@@ -276,4 +284,23 @@ if ( scalar(@agentnums) == 1 ) {
my %status_color = ( 'status' => '#eeffee', 'warning' => '#fefbd0', 'error' => '#f97c7c', );
my %status_image = ( 'status' => 'images/tick.png', 'warning' => 'images/tick.png', 'error' => 'images/error.png', );
+my @top_warnings = ();
+my $deb_version = int(slurp('/etc/debian_version'));
+#per wiki.debian.org/LTS
+push @top_warnings, deb_warning($deb_version)
+ if ( $deb_version <= 8 )
+ or ( $deb_version == 9 && time > 1656658800 ) #7/1/2022
+ or ( $deb_version == 10 && time > 1719817200 ) #7/1/2024
+ or ( $deb_version == 11 && time > 1782889200 ) #7/1/2026
+;
+
+sub deb_warning {
+ my $ver = shift;
+ <<"END";
+WARNING: Your operating system (Debian v$ver) is EOL and no longer supported.
+This is insecure and a violation of PCI data security standard.
+Contact <a href="mailto:sales\@freeside.biz?subject=Debian OS upgrade">sales\@freeside.biz</a> to schedule an upgrade ASAP.
+END
+}
+
</%init>