add duckbot (CloudBot) unit file.

Fix formatting and add hardening variables

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
This commit is contained in:
Pratyush Desai 2025-06-13 04:06:45 +05:30
parent 58b13912a7
commit 42456fce67
Signed by: pratyush
GPG Key ID: DBA5BB7505946FAD

20
systemd/duckbot.service Normal file
View File

@ -0,0 +1,20 @@
[Unit]
Description=CloudBot (duckbot)
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/duckbot/CloudBot
ExecStart=/opt/duckbot/venv/bin/python -m cloudbot
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
User=duckbot
Group=duckbot
SyslogIdentifier=duckbot
ProtectSystem=strict
ProtectHome=yes
NoNewPrivileges=true
ReadWritePaths=/opt/duckbot/CloudBot
[Install]
WantedBy=multi-user.target