any.software.syncthing: add role
This commit is contained in:
parent
00342d5027
commit
1a36730629
3 changed files with 62 additions and 0 deletions
24
roles/any.software.syncthing/templates/syncthing.service.j2
Normal file
24
roles/any.software.syncthing/templates/syncthing.service.j2
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=Syncthing - Open Source Continuous File Synchronization
|
||||
Documentation=man:syncthing(1)
|
||||
After=network.target
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=4
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/syncthing serve --no-browser --no-restart --logflags=0 --config='{{ syncthing_config_dir }}' --data='{{ syncthing_data_dir }}' --no-default-folder --gui-address=0.0.0.0:8384
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
SuccessExitStatus=3 4
|
||||
RestartForceExitStatus=3 4
|
||||
Environment="HOME={{ syncthing_home_dir }}"
|
||||
|
||||
# Hardening
|
||||
ProtectSystem=full
|
||||
PrivateTmp=true
|
||||
SystemCallArchitectures=native
|
||||
MemoryDenyWriteExecute=true
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue