From b5ad38a27dbb5ad8874f616dbcd123d44bdaa348 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 18 Feb 2018 11:54:12 +0100 Subject: [PATCH] Add service and logrotate files --- e2guardian.logrotate | 10 ++++++++++ e2guardian.service | 15 +++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 e2guardian.logrotate create mode 100644 e2guardian.service diff --git a/e2guardian.logrotate b/e2guardian.logrotate new file mode 100644 index 0000000..fc1c35b --- /dev/null +++ b/e2guardian.logrotate @@ -0,0 +1,10 @@ +/var/log/e2guardian/access.log { + rotate 4 + weekly + sharedscripts + + postrotate + systemctl restart e2guardian + endscript +} + diff --git a/e2guardian.service b/e2guardian.service new file mode 100644 index 0000000..06403a3 --- /dev/null +++ b/e2guardian.service @@ -0,0 +1,15 @@ +[Unit] +Description=E2guardian Web filtering +After=network.target + +[Service] +LimitNOFILE=65535 +Type=simple +IgnoreSIGPIPE=no +ExecStart=/usr/sbin/e2guardian -N +ExecReload=/usr/sbin/e2guardian -r +Restart=always + +[Install] +WantedBy=multi-user.target +