From: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
To: development@lists.ipfire.org
Subject: [PATCH 06/12] statusmail: Infrastructure files
Date: Fri, 05 Apr 2019 18:29:34 +0100 [thread overview]
Message-ID: <20190405172940.13168-7-ipfr@tfitzgeorge.me.uk> (raw)
In-Reply-To: <20190405172940.13168-1-ipfr@tfitzgeorge.me.uk>
[-- Attachment #1: Type: text/plain, Size: 8631 bytes --]
Adds statusmail to build and menu
Signed-off-by: Tim FitzGeorge <ipfr(a)tfitzgeorge.me.uk>
---
config/backup/include | 3 ++
| 5 +++
config/rootfiles/common/misc-progs | 1 +
config/rootfiles/common/statusmail | 22 +++++++++
config/rootfiles/common/web-user-interface | 2 +
lfs/statusmail | 71 ++++++++++++++++++++++++++++++
make.sh | 2 +
src/misc-progs/Makefile | 2 +-
8 files changed, 107 insertions(+), 1 deletion(-)
create mode 100644 config/rootfiles/common/statusmail
create mode 100644 lfs/statusmail
diff --git a/config/backup/include b/config/backup/include
index 1190eda81..bd8b77198 100644
--- a/config/backup/include
+++ b/config/backup/include
@@ -49,6 +49,9 @@
/var/ipfire/suricata/*.conf
/var/ipfire/suricata/*.yaml
/var/ipfire/*/settings
+/var/ipfire/statusmail/contact_settings
+/var/ipfire/statusmail/schedule_settings
+/var/ipfire/statusmail/keys/*.gpg
/var/ipfire/time/
/var/ipfire/urlfilter
/var/ipfire/vpn
--git a/config/menu/10-system.menu b/config/menu/10-system.menu
index 3b84e31c0..007f7e95d 100644
--- a/config/menu/10-system.menu
+++ b/config/menu/10-system.menu
@@ -21,6 +21,11 @@
'title' => "$Lang::tr{'email settings'}",
'enabled' => 1,
};
+ $subsystem->{'25.statusmail'} = {'caption' => $Lang::tr{'statusmail status emails'},
+ 'uri' => '/cgi-bin/statusmail.cgi',
+ 'title' => $Lang::tr{'statusmail status emails'},
+ 'enabled' => 1,
+ };
$subsystem->{'30.ssh'} = {
'caption' => $Lang::tr{'ssh access'},
'uri' => '/cgi-bin/remote.cgi',
diff --git a/config/rootfiles/common/misc-progs b/config/rootfiles/common/misc-progs
index c48a474b2..828ed2383 100644
--- a/config/rootfiles/common/misc-progs
+++ b/config/rootfiles/common/misc-progs
@@ -26,6 +26,7 @@ usr/local/bin/redctrl
#usr/local/bin/sambactrl
usr/local/bin/setaliases
usr/local/bin/smartctrl
+usr/local/bin/statusmailctrl
usr/local/bin/squidctrl
usr/local/bin/suricatactrl
usr/local/bin/sshctrl
diff --git a/config/rootfiles/common/statusmail b/config/rootfiles/common/statusmail
new file mode 100644
index 000000000..4a754990e
--- /dev/null
+++ b/config/rootfiles/common/statusmail
@@ -0,0 +1,22 @@
+#usr/lib/statusmail
+usr/lib/statusmail/EncryptedMail.pm
+usr/lib/statusmail/StatusMail.pm
+usr/lib/statusmail/generate_signature.sh
+#usr/lib/statusmail/plugins
+usr/lib/statusmail/plugins/graphs.pm
+usr/lib/statusmail/plugins/hardware_media_space.pm
+usr/lib/statusmail/plugins/network_firewall.pm
+#usr/lib/statusmail/plugins/services_ups_apc.pm
+#usr/lib/statusmail/plugins/services_clamav.pm
+usr/lib/statusmail/plugins/services_intrusion_prevention_system.pm
+usr/lib/statusmail/plugins/services_urlfilter.pm
+usr/lib/statusmail/plugins/system_kernel.pm
+usr/lib/statusmail/plugins/system_pakfire.pm
+usr/lib/statusmail/plugins/system_ssh.pm
+usr/lib/statusmail/plugins/system_status_ps.pm
+usr/lib/statusmail/plugins/system_status_services.pm
+usr/lib/statusmail/stylesheet.css
+usr/local/bin/statusmail.pl
+usr/lib/statusmail/statusmail.sh
+var/ipfire/statusmail
+var/ipfire/statusmail/keys
diff --git a/config/rootfiles/common/web-user-interface b/config/rootfiles/common/web-user-interface
index d538b8a5b..e78e09abe 100644
--- a/config/rootfiles/common/web-user-interface
+++ b/config/rootfiles/common/web-user-interface
@@ -79,6 +79,7 @@ srv/web/ipfire/cgi-bin/routing.cgi
srv/web/ipfire/cgi-bin/services.cgi
srv/web/ipfire/cgi-bin/shutdown.cgi
srv/web/ipfire/cgi-bin/speed.cgi
+srv/web/ipfire/cgi-bin/statusmail.cgi
srv/web/ipfire/cgi-bin/system.cgi
srv/web/ipfire/cgi-bin/time.cgi
#srv/web/ipfire/cgi-bin/tor.cgi
@@ -237,6 +238,7 @@ srv/web/ipfire/html/images/on.gif
srv/web/ipfire/html/images/openvpn.gif
srv/web/ipfire/html/images/openvpn.png
srv/web/ipfire/html/images/package-x-generic.png
+srv/web/ipfire/html/images/play.png
srv/web/ipfire/html/images/printer-error.png
srv/web/ipfire/html/images/printer.png
srv/web/ipfire/html/images/process-stop.png
diff --git a/lfs/statusmail b/lfs/statusmail
new file mode 100644
index 000000000..8ddf2df36
--- /dev/null
+++ b/lfs/statusmail
@@ -0,0 +1,71 @@
+###############################################################################
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) 2007-2019 IPFire Team <info(a)ipfire.org> #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER = 1.0
+
+THISAPP = statusmail
+DIR_APP = $(DIR_SRC)/$(THISAPP)
+TARGET = $(DIR_INFO)/$(THISAPP)
+PROG = statusmail
+PAK_VER = 1
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+install : $(TARGET)
+
+check :
+
+download :
+
+md5 :
+
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+ @$(PREBUILD)
+ @rm -rf $(DIR_APP) && mkdir $(DIR_APP) && cp -R $(DIR_SRC)/src/statusmail/ $(DIR_APP)
+ cd $(DIR_APP)
+ mkdir -p /usr/lib/statusmail
+ mkdir -p /usr/lib/statusmail/plugins
+ mkdir -p /var/ipfire/statusmail
+ mkdir -p /var/ipfire/statusmail/keys
+
+ chown nobody.nobody /var/ipfire/statusmail/keys
+ chmod 0700 /var/ipfire/statusmail/keys
+ chown nobody.nobody /var/ipfire/statusmail
+
+ install -v -m 0755 $(DIR_APP)/statusmail/statusmail.pl /usr/local/bin
+ install -v -m 0755 $(DIR_APP)/statusmail/statusmail.sh /usr/lib/statusmail
+ install -v -m 0644 $(DIR_APP)/statusmail/EncryptedMail.pm /usr/lib/statusmail
+ install -v -m 0644 $(DIR_APP)/statusmail/StatusMail.pm /usr/lib/statusmail
+ install -v -m 0755 $(DIR_APP)/statusmail/stylesheet.css /usr/lib/statusmail
+ install -v -m 0755 $(DIR_APP)/statusmail/generate_signature.sh /usr/lib/statusmail
+
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/graphs.pm /usr/lib/statusmail/plugins
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/hardware_media_space.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/network_firewall.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/system_kernel.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/system_pakfire.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/system_ssh.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/system_status_ps.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/system_status_services.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/services_urlfilter.pm /usr/lib/statusmail/plugins/
+ install -v -m 0644 $(DIR_APP)/statusmail/plugins/services_intrusion_prevention_system.pm /usr/lib/statusmail/plugins/
+# install -v -m 0644 $(DIR_APP)/statusmail/plugins/services_clamav.pm /usr/lib/statusmail/plugins/
+# install -v -m 0644 $(DIR_APP)/statusmail/plugins/services_ups_apc.pm /usr/lib/statusmail/plugins/
+
+ @rm -rf $(DIR_APP)
+ @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index de973c69c..6be8d1d7f 100755
--- a/make.sh
+++ b/make.sh
@@ -1594,6 +1595,7 @@ buildipfire() {
lfsmake2 zabbix_agentd
lfsmake2 flashrom
lfsmake2 firmware-update
+ lfsmake2 statusmail
}
buildinstaller() {
diff --git a/src/misc-progs/Makefile b/src/misc-progs/Makefile
index bea54e773..42f239cec 100644
--- a/src/misc-progs/Makefile
+++ b/src/misc-progs/Makefile
@@ -32,7 +32,7 @@ SUID_PROGS = squidctrl sshctrl ipfirereboot \
smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
setaliases urlfilterctrl updxlratorctrl fireinfoctrl rebuildroutes \
getconntracktable wirelessclient torctrl ddnsctrl unboundctrl \
- captivectrl
+ captivectrl statusmailctrl
SUID_UPDX = updxsetperms
OBJS = $(patsubst %,%.o,$(PROGS) $(SUID_PROGS))
--
2.16.4
next prev parent reply other threads:[~2019-04-05 17:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 17:29 [PATCH 00/12] statusmail: Status and Log Summary Emails Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 01/12] statusmail: Main script Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 02/12] statusmail: Perl module for encrypted Encrypted Mail Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 03/12] statusmail: WUI Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 04/12] statusmail: Supporting files Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 05/12] statusmail: Language files Tim FitzGeorge
2019-04-05 17:29 ` Tim FitzGeorge [this message]
2019-04-05 17:29 ` [PATCH 07/12] statusmail: Plugins for services Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 08/12] statusmail: Plugins for system Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 09/12] statusmail: Other plugins Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 10/12] statusmail: Graph infrastructure changes Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 11/12] statusmail: Plugin for apcupsd Tim FitzGeorge
2019-04-05 17:29 ` [PATCH 12/12] statusmail: Plugin for clamav Tim FitzGeorge
2019-04-08 16:10 ` [PATCH 00/12] statusmail: Status and Log Summary Emails Michael Tremer
2019-04-08 19:37 ` Tim FitzGeorge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190405172940.13168-7-ipfr@tfitzgeorge.me.uk \
--to=ipfr@tfitzgeorge.me.uk \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox