| 1 | [Unit] |
| 2 | Description=Ferrenium git repository browser |
| 3 | After=network.target |
| 4 | |
| 5 | [Service] |
| 6 | Type=notify |
| 7 | ExecStart=/usr/local/bin/ferrenium serve --config /etc/ferrenium/ferrenium.toml |
| 8 | ExecReload=/bin/kill -HUP $MAINPID |
| 9 | Restart=on-failure |
| 10 | TimeoutStopSec=15 |
| 11 | |
| 12 | User=git |
| 13 | Group=git |
| 14 | RuntimeDirectory=ferrenium |
| 15 | RuntimeDirectoryMode=0755 |
| 16 | |
| 17 | # Read-only sandbox: ferrenium never writes to disk. |
| 18 | ProtectSystem=strict |
| 19 | ProtectHome=read-only |
| 20 | PrivateTmp=yes |
| 21 | PrivateDevices=yes |
| 22 | ProtectKernelTunables=yes |
| 23 | ProtectKernelModules=yes |
| 24 | ProtectKernelLogs=yes |
| 25 | ProtectControlGroups=yes |
| 26 | ProtectClock=yes |
| 27 | ProtectHostname=yes |
| 28 | ProtectProc=invisible |
| 29 | ProcSubset=pid |
| 30 | NoNewPrivileges=yes |
| 31 | CapabilityBoundingSet= |
| 32 | AmbientCapabilities= |
| 33 | RestrictNamespaces=yes |
| 34 | RestrictRealtime=yes |
| 35 | RestrictSUIDSGID=yes |
| 36 | LockPersonality=yes |
| 37 | MemoryDenyWriteExecute=yes |
| 38 | SystemCallArchitectures=native |
| 39 | SystemCallFilter=@system-service |
| 40 | RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 |
| 41 | |
| 42 | [Install] |
| 43 | WantedBy=multi-user.target |