server-config/systemd_units/walls-bot-rs.service
Harsh Shandilya c3a2ccb256
systemd_units/walls-bot-rs: Don't use EnvironmentFile
walls-bot-rs uses dotenv

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-02 13:10:01 +05:30

31 lines
657 B
Desktop File

[Unit]
Description=walls-bot-rs service
After=network.target
[Service]
Restart=on-abort
Type=simple
User=bot
WorkingDirectory=/home/bot/walls-bot-rs
ExecStartPre=/usr/bin/git pull origin master
ExecStart=/home/bot/.cargo/bin/cargo run --release
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
RestrictNamespaces=true
RestrictRealtime=true
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target