apps:lightmeter
Lightmeter
https://gitlab.com/lightmeter/controlcenter/-/blob/master/README.md
adduser lightmeter usermod -a -G adm lightmeter
wget -O /usr/local/bin/lightmeter "https://bintray.com/lightmeter/controlcenter/download_file?file_path=lightmeter-linux_amd64-1.0.1"
chmod +rx /usr/local/bin/lightmeter
mkdir /var/lib/lightmeter chown lightmeter:lightmeter /var/lib/lightmeter
vim /etc/systemd/system/lightmeter.service
[Unit] Description=Lightmeter is a monitoring and analysis system for Postfix mail servers (https://lightmeter.io) After=network.target [Service] Type=simple User=lightmeter ;Group=adm Group=lightmeter ExecStart=/usr/local/bin/lightmeter -workspace /var/lib/lightmeter/lightmeter_workspace -watch_dir /var/log/ -listen 127.0.0.1:8085 Restart=on-failure ; security PrivateDevices=yes PrivateTmp=yes ProtectSystem=full ReadWriteDirectories=/var/log/ /var/lib/lightmeter/ /usr/local/bin/ /tmp/ ProtectHome=yes NoNewPrivileges=yes [Install] WantedBy=multi-user.target
systemctl daemon-reload systemctl start lightmeter.service
vim /etc/apache2/sites-available/lightmeter.example.com.conf
<VirtualHost *:80> ServerName lightmeter.example.com ServerAdmin hostmaster@example.com Redirect "/" "https://lightmeter.example.com/" ErrorLog ${APACHE_LOG_DIR}/lightmeter.example.com-error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/lightmeter.example.com-access.log combined </VirtualHost> <VirtualHost *:443> ServerName lightmeter.example.com ServerAdmin hostmaster@example.com SSLEngine on SSLCertificateFile /etc/dehydrated/certs/example.com/fullchain.pem SSLCertificateKeyFile /etc/dehydrated/certs/example.com/privkey.pem <Location "/.well-known/acme-challenge/"> Allow From All Satisfy Any </Location> ProxyPassMatch ^/.well-known ! ProxyPass "/" "http://127.0.0.1:8085/" ProxyPassReverse "/" "http://127.0.0.1:8085/" ErrorLog ${APACHE_LOG_DIR}/lightmeter.example.com-error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/lightmeter.example.com-access.log combined </VirtualHost>
a2ensite lightmeter.example.com apachectl graceful
apps/lightmeter.txt · Last modified: 2020-12-02 10:25 by Manuel Frei