Jacek Sieka 255be39e69
packaging updates (#3974)
* packaging updates

* one package per binary (nimbus_beacon_node, nimbus_validator_client)
* use `-` in package name (`_` is separating the version)
* don't include (un)installation scripts in package
* default metrics port 8108 for vc
* fix several upgrade/install errors in scripts
* add JWT option to service files
* don't attempt to remove user on purge
2022-08-17 13:26:31 +03:00

23 lines
455 B
Bash

#!/bin/bash
set -e
DISTRO=$(lsb_release -si)
if ! id -u nimbus > /dev/null 2>&1; then
case $DISTRO in
Ubuntu|Debian)
# Debian uses `adduser` to create user...
adduser --system --no-create-home --group nimbus
;;
*)
# ... while `useradd` is more standard
useradd --system --no-create-home --user-group nimbus
;;
esac
fi
mkdir -p /var/lib/nimbus
chown nimbus:nimbus /var/lib/nimbus
systemctl daemon-reload