personality
Clone
https://git.tahinli.com/Tahinli/personality.git
0 watching0 forksRustGPL-3.0460.1 KiB4de8815Tahinli7 days ago22 commits
| 1 | [Unit] |
| 2 | Description=personality: personal website, as a user service |
| 3 | # No network-online.target: it is a system unit that a user manager cannot see, and personality binds 127.0.0.1. |
| 4 | StartLimitIntervalSec=60 |
| 5 | StartLimitBurst=5 |
| 6 | |
| 7 | [Service] |
| 8 | Type=simple |
| 9 | # Runs as the account that owns this unit (for example `apps`), under its user manager. No User= or Group=. |
| 10 | # The binary is installed by kur into ~/bin/personality. |
| 11 | Environment=HOST=127.0.0.1 |
| 12 | Environment=PORT=2020 |
| 13 | ExecStart=%h/bin/personality |
| 14 | Restart=on-failure |
| 15 | RestartSec=2 |
| 16 | LimitNOFILE=65536 |
| 17 | MemoryMax=256M |
| 18 | UMask=0077 |
| 19 | |
| 20 | # Hardening. Only the options a user manager applies without special privileges. The namespace-based options |
| 21 | # of the system unit (ProtectSystem, PrivateTmp, ProtectHome, PrivateDevices, and the rest) are left out: |
| 22 | # a user manager can apply them only where unprivileged user namespaces are available. |
| 23 | NoNewPrivileges=yes |
| 24 | LockPersonality=yes |
| 25 | RestrictRealtime=yes |
| 26 | RestrictSUIDSGID=yes |
| 27 | MemoryDenyWriteExecute=yes |
| 28 | SystemCallArchitectures=native |
| 29 | SystemCallFilter=@system-service |
| 30 | SystemCallFilter=~@privileged |
| 31 | RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 |
| 32 | |
| 33 | [Install] |
| 34 | WantedBy=default.target |