Add systemd file for crab
This commit is contained in:
parent
a2d8ae96b9
commit
fb966d73bb
2 changed files with 30 additions and 0 deletions
22
files/crab.service
Normal file
22
files/crab.service
Normal file
|
@ -0,0 +1,22 @@
|
|||
[Unit]
|
||||
Description=Crab Router
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nobody
|
||||
ExecStart=/usr/bin/crab router
|
||||
Environment="CRAB_ROUTER_HOST=0.0.0.0"
|
||||
|
||||
# Allow port 80 bind
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
NoNewPrivileges=yes
|
||||
|
||||
# More protections, because why not
|
||||
PrivateDevices=yes
|
||||
PrivateTmp=yes
|
||||
ProtectSystem=full
|
||||
|
||||
[Install]
|
||||
RequiredBy=multi-user.target
|
|
@ -43,3 +43,11 @@
|
|||
option: ignore
|
||||
value: "{{ home }}/.config/.gitignore"
|
||||
mode: 0644
|
||||
|
||||
- name: Install Crab service
|
||||
template:
|
||||
src: ./files/crab.service
|
||||
dest: /etc/systemd/system/crab.service
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
|
|
Loading…
Reference in a new issue