mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +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
|
description: Polygon Blockchain
|
||||||
license: GPLv3 LGPLv3
|
license: GPLv3 LGPLv3
|
||||||
|
|
||||||
|
bindir: /usr/local/bin
|
||||||
|
|
||||||
formats:
|
formats:
|
||||||
- apk
|
- apk
|
||||||
- deb
|
- deb
|
||||||
- rpm
|
- rpm
|
||||||
|
|
||||||
contents:
|
contents:
|
||||||
|
- dst: /var/lib/bor
|
||||||
|
type: dir
|
||||||
|
file_info:
|
||||||
|
mode: 0777
|
||||||
- src: builder/files/bor.service
|
- src: builder/files/bor.service
|
||||||
dst: /lib/systemd/system/bor.service
|
dst: /lib/systemd/system/bor.service
|
||||||
type: config
|
type: config
|
||||||
|
|
@ -94,6 +100,9 @@ nfpms:
|
||||||
dst: /var/lib/bor/config.toml
|
dst: /var/lib/bor/config.toml
|
||||||
type: config
|
type: config
|
||||||
|
|
||||||
|
scripts:
|
||||||
|
postinstall: builder/files/bor-post-install.sh
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
rpm:
|
rpm:
|
||||||
replacements:
|
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
|
RestartSec=5s
|
||||||
ExecStart=/usr/local/bin/bor server -config="/var/lib/bor/config.toml"
|
ExecStart=/usr/local/bin/bor server -config="/var/lib/bor/config.toml"
|
||||||
Type=simple
|
Type=simple
|
||||||
User=ubuntu
|
User=bor
|
||||||
KillSignal=SIGINT
|
KillSignal=SIGINT
|
||||||
TimeoutStopSec=120
|
TimeoutStopSec=120
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue