server-config/systemd_units/walls-bot.service
Harsh Shandilya 0ff3378a41
walls-bot: Don't use Gradle to run process
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-22 14:40:25 +05:30

31 lines
703 B
Desktop File

[Unit]
Description=Desktop walls bot service
After=network.target
[Service]
Restart=on-abort
Type=simple
User=bot
WorkingDirectory=/home/bot/walls-bot
ExecStartPre=/home/bot/walls-bot/gradlew --no-daemon build
ExecStart=/usr/bin/java -jar /home/bot/walls-bot/build/libs/wallsbot-0.1-all.jar
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