nimbus-eth2/scripts/package_src/nimbus_beacon_node/after_install

23 lines
455 B
Plaintext
Raw Normal View History

#!/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