Add telegram-bot-workout

This commit is contained in:
2021-09-21 15:53:10 +02:00
parent b016a50b13
commit 808e8c4be2
3 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
[Unit]
After=network-online.target
[Service]
User=telegram-bots
Environment=RUST_LOG=info
Environment=WORKOUT_BOT_CONFIG_FILE=/etc/telegram-bot-workout.json
ExecStart=/usr/bin/workout-bot
Restart=on-failure
RestartSec=5s
ReadOnlyPaths=/etc/telegram-bot-workout.json
ReadWritePaths=/var/lib/telegram-bots/
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
PrivateUsers=yes
PrivateMounts=yes
DevicePolicy=closed
ProtectSystem=strict
ProtectHome=yes
ProtectClock=yes
ProtectHostname=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK
CapabilityBoundingSet=
SystemCallArchitectures=native
SystemCallFilter=@system-service
ProtectKernelLogs=yes
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
MemoryDenyWriteExecute=yes
LockPersonality=yes
RemoveIPC=yes
[Install]
WantedBy=multi-user.target