This commit is contained in:
parent
a18fa88e50
commit
7cf2553b99
4 changed files with 82 additions and 1 deletions
14
support/postinst
Executable file
14
support/postinst
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ! id -u siahsd >/dev/null 2>&1; then
|
||||
useradd \
|
||||
--no-user-group \
|
||||
--system \
|
||||
--create-home \
|
||||
--home-dir /var/lib/siahsd \
|
||||
--shell /usr/sbin/nologin siahsd \
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart siahsd.service
|
||||
systemctl enable siahsd.service
|
15
support/systemd.service
Normal file
15
support/systemd.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=SIA-HS daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/var/lib/siahsd/siahsd.pid
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
ExecStartPre=-/bin/rm /var/lib/siahsd/siahsd.pid
|
||||
ExecStart=/usr/bin/siahsd
|
||||
User=siahsd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue