services/siahsd: Permit PID file to be written

This commit is contained in:
polyfloyd 2022-10-28 14:00:11 +02:00
parent f6c4f1c887
commit fb420558c9
3 changed files with 7 additions and 5 deletions

View file

@ -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:

View file

@ -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

View file

@ -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