github.com/ethersphere/bee/v2@v2.2.0/packaging/rpm/pre (about) 1 if [ $1 -eq 1 ] ; then 2 # Initial installation 3 if ! getent passwd bee > /dev/null; then 4 useradd -r -d /var/lib/bee -s /sbin/nologin -U bee 5 fi 6 if ! test -d /var/lib/bee; then 7 mkdir -p /var/lib/bee 8 chmod 0750 /var/lib/bee 9 chown -R bee:bee /var/lib/bee 10 fi 11 if ! test -f /var/lib/bee/password; then 12 < /dev/urandom tr -dc _A-Z-a-z-0-9 2> /dev/null | head -c32 > /var/lib/bee/password 13 chmod 0600 /var/lib/bee/password 14 chown bee:bee /var/lib/bee/password 15 fi 16 fi