Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 15086118ee515ad4a4f29b1e826b53ad > scriptlet

nocpulse-common-2.1.19-2.fc14.noarch.rpm

PREIN

/bin/sh
# change nocpulse user & group to system user & group if needed
dirs="/home/nocpulse /opt/notification /opt/nocpulse /var/log/nocpulse /var/www/templates /var/tmp"

# Fedora guys do not want this stuff


getent group nocpulse >/dev/null || groupadd -r nocpulse
getent passwd nocpulse >/dev/null || \
useradd -r -g nocpulse -G apache -d /var/lib/nocpulse -s /bin/bash -c "NOCpulse user" nocpulse
/usr/bin/passwd -l nocpulse >/dev/null

# if user already exists (rhnmd creates it too) add nocpulse to apache group
getent group apache | grep nocpulse >/dev/null || usermod -G apache nocpulse

POSTIN

/bin/sh
# Fedora guys do not want this stuff

if [ ! -f /var/lib/nocpulse/.ssh/nocpulse-identity ]
then
    /sbin/runuser -s /bin/bash -c "/usr/bin/ssh-keygen -q -t dsa -N '' -f /var/lib/nocpulse/.ssh/nocpulse-identity" - nocpulse
fi