From d9ef6e5f3d6d453e18c1e99692cc059c3752a874 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 25 Dec 2019 00:34:33 +0530 Subject: [PATCH] Add goaccess service Signed-off-by: Harsh Shandilya --- systemd_units/goaccess.service | 21 +++++++++++++++++++++ systemd_units/update.sh | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 systemd_units/goaccess.service diff --git a/systemd_units/goaccess.service b/systemd_units/goaccess.service new file mode 100644 index 0000000..3923baf --- /dev/null +++ b/systemd_units/goaccess.service @@ -0,0 +1,21 @@ +[Unit] +Description=goaccess: real-time web log analyzer +After=syslog.target +After=network.target + +[Service] +LimitMEMLOCK=infinity +LimitNOFILE=65535 +RestartSec=2s +Type=simple +User=caddy +Group=caddy +ExecStart=/usr/bin/goaccess --log-format=VCOMMON --ws-url=wss://stats.msfjarvis.dev/ws --output=/var/www/stats.msfjarvis.website/index.html --log-file=/etc/logs/requests.log --no-query-string --anonymize-ip --double-decode --real-os --compression=zlib --real-time-html +Restart=always +PrivateTmp=true +PrivateDevices=true +ProtectHome=true +ProtectSystem=full + +[Install] +WantedBy=multi-user.target diff --git a/systemd_units/update.sh b/systemd_units/update.sh index 6c44d0a..307c2b0 100755 --- a/systemd_units/update.sh +++ b/systemd_units/update.sh @@ -8,7 +8,7 @@ function prettyPrint { } # Grab all service names -declare -a services=('caddy' 'daas' 'gitea' 'mirror-bot' 'mirror-bot-2' 'mkr-bin' 'pyrobud' 'uno-bot' 'walls-bot') +declare -a services=('caddy' 'daas' 'gitea' 'goaccess' 'mirror-bot' 'mirror-bot-2' 'mkr-bin' 'pyrobud' 'uno-bot' 'walls-bot') # Now loop through each service and install it for service in "${services[@]}"; do