aien-edge
aien-dev/aien-edge
Brought by drakestapleton
aien-edge / deploy / aien-edge.service
| 1 | [Unit] |
| 2 | Description=aien-edge static site server (www.aienos.com, www.drakestapleton.com) |
| 3 | After=network-online.target |
| 4 | Wants=network-online.target |
| 5 | |
| 6 | [Service] |
| 7 | Type=simple |
| 8 | ExecStart=/usr/local/bin/aien-edge /etc/aien-edge/config.toml |
| 9 | ExecReload=/bin/kill -HUP $MAINPID |
| 10 | Restart=always |
| 11 | RestartSec=2 |
| 12 | |
| 13 | # Runs as a throwaway user with no shell, no home, and no write access |
| 14 | # outside its certificate cache. |
| 15 | DynamicUser=yes |
| 16 | StateDirectory=aien-edge |
| 17 | AmbientCapabilities=CAP_NET_BIND_SERVICE |
| 18 | CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
| 19 | NoNewPrivileges=yes |
| 20 | ProtectSystem=strict |
| 21 | ProtectHome=yes |
| 22 | PrivateTmp=yes |
| 23 | PrivateDevices=yes |
| 24 | ProtectKernelTunables=yes |
| 25 | ProtectKernelModules=yes |
| 26 | ProtectControlGroups=yes |
| 27 | RestrictAddressFamilies=AF_INET AF_INET6 |
| 28 | RestrictNamespaces=yes |
| 29 | LockPersonality=yes |
| 30 | MemoryDenyWriteExecute=yes |
| 31 | SystemCallArchitectures=native |
| 32 | SystemCallFilter=@system-service |
| 33 | ReadOnlyPaths=/srv/sites |
| 34 | LimitNOFILE=65536 |
| 35 | |
| 36 | [Install] |
| 37 | WantedBy=multi-user.target |