mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
Add 'bor' user during package installation
This commit is contained in:
parent
6e8428bfaa
commit
cd04702345
3 changed files with 19 additions and 1 deletions
|
|
@ -75,12 +75,18 @@ nfpms:
|
|||
description: Polygon Blockchain
|
||||
license: GPLv3 LGPLv3
|
||||
|
||||
bindir: /usr/local/bin
|
||||
|
||||
formats:
|
||||
- apk
|
||||
- deb
|
||||
- rpm
|
||||
|
||||
contents:
|
||||
- dst: /var/lib/bor
|
||||
type: dir
|
||||
file_info:
|
||||
mode: 0777
|
||||
- src: builder/files/bor.service
|
||||
dst: /lib/systemd/system/bor.service
|
||||
type: config
|
||||
|
|
@ -94,6 +100,9 @@ nfpms:
|
|||
dst: /var/lib/bor/config.toml
|
||||
type: config
|
||||
|
||||
scripts:
|
||||
postinstall: builder/files/bor-post-install.sh
|
||||
|
||||
overrides:
|
||||
rpm:
|
||||
replacements:
|
||||
|
|
|
|||
9
builder/files/bor-post-install.sh
Normal file
9
builder/files/bor-post-install.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
PKG="bor"
|
||||
|
||||
if ! getent passwd $PKG >/dev/null ; then
|
||||
adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent $PKG
|
||||
echo "Created system user $PKG"
|
||||
fi
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
RestartSec=5s
|
||||
ExecStart=/usr/local/bin/bor server -config="/var/lib/bor/config.toml"
|
||||
Type=simple
|
||||
User=ubuntu
|
||||
User=bor
|
||||
KillSignal=SIGINT
|
||||
TimeoutStopSec=120
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue