Fix permissions for systemd service (needs AF_NETLINK)

This commit is contained in:
Florent 2021-09-12 17:24:08 +02:00 committed by Florent F
parent 0f982309cc
commit 20bec238c9

View file

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Discord-Matrix daemon Description=Discord-Matrix daemon
After=network.target After=network.target matrix-synapse.target
[Service] [Service]
Type=simple Type=simple
@ -9,7 +9,7 @@ Environment="__YNH_NODE_LOAD_PATH__"
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=__YNH_NPM__ start -- -f __APP__.yaml ExecStart=__YNH_NPM__ start -- -f __FINALPATH__/__APP__.yaml
StandardOutput=syslog StandardOutput=syslog
StandardError=syslog StandardError=syslog
@ -20,7 +20,7 @@ StandardError=syslog
NoNewPrivileges=yes NoNewPrivileges=yes
PrivateTmp=yes PrivateTmp=yes
PrivateDevices=yes PrivateDevices=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes RestrictNamespaces=yes
RestrictRealtime=yes RestrictRealtime=yes
DevicePolicy=closed DevicePolicy=closed