This commit is contained in:
parent
554593a045
commit
1ec4407008
5 changed files with 10 additions and 3 deletions
|
@ -54,3 +54,5 @@ nfpms:
|
|||
dst: /etc/http-server-status/config.yml.sample
|
||||
scripts:
|
||||
postinstall: "scripts/postinstall.sh"
|
||||
preinstall: "scripts/preinstall.sh"
|
||||
postremove: "scripts/postremove.sh"
|
|
@ -4,7 +4,7 @@ After=syslog.target
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
User=http-server-status
|
||||
ExecStart=/usr/local/bin/http-server-status
|
||||
SyslogIdentifier=http-server-status
|
||||
StandardOutput=syslog
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
systemctl daemon-reload
|
||||
systemctl restart http-server-status
|
||||
systemctl is-active --quiet http-server-status && systemctl restart http-server-status && echo "Restart Service"
|
||||
|
|
1
scripts/postremove.sh
Normal file
1
scripts/postremove.sh
Normal file
|
@ -0,0 +1 @@
|
|||
deluser --remove-home http-server-status
|
4
scripts/preinstall.sh
Normal file
4
scripts/preinstall.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#/bin/sh
|
||||
if ! id -u http-server-status > /dev/null 2>&1; then
|
||||
adduser --system http-server-status
|
||||
fi
|
Loading…
Reference in a new issue