forked from bitlair/ansible
services/siahsd: Permit PID file to be written
This commit is contained in:
parent
f6c4f1c887
commit
fb420558c9
3 changed files with 7 additions and 5 deletions
|
@ -1,12 +1,15 @@
|
||||||
---
|
---
|
||||||
# TODO: Install and build
|
# TODO: Install and build
|
||||||
|
|
||||||
- name: Create log dir
|
- name: Create directories
|
||||||
file:
|
file:
|
||||||
path: /var/log/siahsd
|
path: /var/log/siahsd
|
||||||
state: directory
|
state: directory
|
||||||
owner: siahsd
|
owner: siahsd
|
||||||
group: nogroup
|
group: nogroup
|
||||||
|
with_items:
|
||||||
|
- /var/log/siahsd
|
||||||
|
- /run/siahsd
|
||||||
|
|
||||||
- name: Install service file
|
- name: Install service file
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[siahsd]
|
[siahsd]
|
||||||
pid file = /run/siahsd.pid
|
pid file = /run/siahsd/siahsd.pid
|
||||||
log file = /var/log/siahsd/siahsd.log
|
log file = /var/log/siahsd/siahsd.log
|
||||||
log level = 3
|
log level = 3
|
||||||
foreground = 0
|
foreground = 0
|
||||||
|
|
|
@ -6,12 +6,11 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/run/siahsd.pid
|
PIDFile=/run/siahsd/siahsd.pid
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2s
|
RestartSec=10s
|
||||||
ExecStart=/usr/local/src/siahsd/build/siahsd
|
ExecStart=/usr/local/src/siahsd/build/siahsd
|
||||||
User=siahsd
|
User=siahsd
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue