2020-11-10 06:06:38 +01:00
|
|
|
# Changing the systemd config can be done like this:
|
2021-01-25 13:08:34 +01:00
|
|
|
# 1) Edit the config file: systemctl edit --full miniflux
|
|
|
|
# 2) Restart the process: systemctl restart miniflux
|
|
|
|
# All your changes can be reverted with `systemctl revert miniflux.service`.
|
|
|
|
# See https://wiki.archlinux.org/index.php/Systemd#Editing_provided_units.
|
2020-11-10 06:06:38 +01:00
|
|
|
|
2020-10-19 01:12:00 +02:00
|
|
|
[Unit]
|
2021-05-23 03:36:32 +02:00
|
|
|
Description=Miniflux
|
2020-10-19 01:12:00 +02:00
|
|
|
After=network.target postgresql.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStart=/usr/bin/miniflux
|
2021-03-11 00:10:17 +01:00
|
|
|
EnvironmentFile=/etc/miniflux.conf
|
|
|
|
User=miniflux
|
|
|
|
|
2021-05-23 03:36:32 +02:00
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=
|
|
|
|
Type=notify
|
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#WatchdogSec=
|
2021-05-23 05:25:38 +02:00
|
|
|
WatchdogSec=60s
|
2021-05-23 03:36:32 +02:00
|
|
|
WatchdogSignal=SIGKILL
|
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#RestartSec=
|
|
|
|
RestartSec=5
|
|
|
|
|
2020-11-10 06:06:38 +01:00
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#NoNewPrivileges=
|
2020-10-19 01:12:00 +02:00
|
|
|
NoNewPrivileges=true
|
2020-11-10 06:06:38 +01:00
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#PrivateDevices=
|
2020-10-19 01:12:00 +02:00
|
|
|
PrivateDevices=true
|
2020-11-10 06:06:38 +01:00
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectControlGroups=
|
2020-10-19 01:12:00 +02:00
|
|
|
ProtectControlGroups=true
|
2020-11-10 06:06:38 +01:00
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectHome=
|
2020-10-19 01:12:00 +02:00
|
|
|
ProtectHome=true
|
2020-11-10 06:06:38 +01:00
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectKernelModules=
|
2020-10-19 01:12:00 +02:00
|
|
|
ProtectKernelModules=true
|
2020-11-10 06:06:38 +01:00
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectKernelTunables=
|
2020-10-19 01:12:00 +02:00
|
|
|
ProtectKernelTunables=true
|
2020-11-10 06:06:38 +01:00
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=
|
2020-10-19 01:12:00 +02:00
|
|
|
ProtectSystem=strict
|
2020-11-10 06:06:38 +01:00
|
|
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RestrictRealtime=
|
2020-10-19 01:12:00 +02:00
|
|
|
RestrictRealtime=true
|
|
|
|
|
2020-11-10 06:06:38 +01:00
|
|
|
# Keep at least the /run folder writeable if Miniflux is configured to use a Unix socket.
|
|
|
|
# For example, the socket could be LISTEN_ADDR=/run/miniflux/miniflux.sock
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
|
|
|
|
ReadWritePaths=/run
|
|
|
|
|
2021-05-23 03:36:32 +02:00
|
|
|
# Allow miniflux to bind to privileged ports
|
2020-12-29 11:47:27 +01:00
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#AmbientCapabilities=
|
|
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
|
|
|
2020-10-19 01:12:00 +02:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|