From d5f15917d007b0bdad39dfaf20a358f76d222ef7 Mon Sep 17 00:00:00 2001 From: L3D Date: Fri, 8 Jan 2021 21:47:04 +0100 Subject: [PATCH] goaccess systemd preperation --- defaults/main.yml | 3 +++ templates/goaccess.service.j2 | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 templates/goaccess.service.j2 diff --git a/defaults/main.yml b/defaults/main.yml index 26bc571..f58baab 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,8 @@ --- goaccess__state: present +goaccess_systemd: true +goaccess__logfiles: '/var/log/apache2/access.log' +goaccess__webfiles: '/var/www/html/report/index.html' # should we do a version check? (recomended) submodules_versioncheck: false diff --git a/templates/goaccess.service.j2 b/templates/goaccess.service.j2 new file mode 100644 index 0000000..47c1dc4 --- /dev/null +++ b/templates/goaccess.service.j2 @@ -0,0 +1,11 @@ +[Unit] +Description=Goaccess +After=network.target + +[Service] +Restart=always +ExecStart=/usr/bin/goaccess {{ goaccess__logfiles }} --log-format=COMBINED -o {{ goaccess__webfiles }} --real-time-html + +[Install] +WantedBy=multi-user.target +