podbringer/debian/podbringer.service
Paul van Tilburg c6789d51fb
Add Debian packaging via cargo-deb
* Add the required metadata to `Cargo.toml`
* Add a systemd unit file
* Use `Rocket.toml.example` as the default configuration
2022-05-20 16:54:09 +02:00

46 lines
874 B
Desktop File

[Unit]
Description=Podbringer web server
After=network.target
[Service]
Type=simple
AmbientCapabilities=
CapabilityBoundingSet=
DynamicUser=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
PrivateDevices=yes
PrivateMounts=yes
PrivateTmp=yes
PrivateUsers=yes
RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallErrorNumber=EPERM
UMask=0077
ExecStart=/usr/sbin/podbringer
Restart=on-failure
RestartSec=10
StartLimitInterval=1m
StartLimitBurst=5
Environment="ROCKET_CONFIG=/etc/podbringer.toml"
[Install]
WantedBy=multi-user.target