server-config/systemd_units/mirror-bot.service
Harsh Shandilya 8d535fe914
systemd/mirror-bot{-2}: Allow AF_NETLINK access
Allows the Node process to communicate with the aria2 daemon

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-09 18:10:59 +05:30

31 lines
657 B
Desktop File

[Unit]
Description=Public mirror bot service
After=network.target
[Service]
Restart=on-abort
Type=simple
User=bot
WorkingDirectory=/home/bot/aria-telegram-mirror-bot
ExecStartPre=/usr/bin/env bash aria.sh
ExecStart=/usr/bin/npm start
ExecReload=/bin/kill -USR1 $MAINPID
KillMode=mixed
KillSignal=SIGQUIT
TimeoutStopSec=5s
# Security
PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
ProtectControlGroups=true
ProtectKernelModules=true
ProtectKernelTunables=true
PrivateDevices=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=true
RestrictRealtime=true
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target