nimbus-eth2/scripts/package_image/after_install

24 lines
530 B
Plaintext
Raw Permalink 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)
adduser --system --no-create-home --group nimbus
;;
Fedora|CentOS*|RedHat*|Scientific|Amazon*|Oracle*)
adduser --system --no-create-home --user-group nimbus
;;
*) # blind shot... ToDo: add more DISTRO cases here
adduser --system --no-create-home --group nimbus
;;
esac
fi
mkdir -p /var/lib/nimbus
chown nimbus:nimbus /var/lib/nimbus
systemctl daemon-reload