Sophie

Sophie

distrib > Fedora > 15 > x86_64 > media > os > by-pkgid > 71cc537b86d648aead83b55b3623cbe7 > scriptlet

smolt-1.4.3-3.fc15.noarch.rpm

PREIN

/bin/sh
/usr/sbin/groupadd -r smolt &>/dev/null || :
/usr/sbin/useradd  -r -s /sbin/nologin -d /usr/share/smolt -M \
                               -c 'Smolt' -g smolt smolt &>/dev/null || :

PREUN

/bin/sh
if [ $1 = 0 ]; then
        /sbin/service smolt stop >/dev/null 2>&1
        /sbin/chkconfig --del smolt
fi

POSTIN

/bin/sh
/sbin/chkconfig --add smolt

#Randomize checkin times.
TMPFILE=$(/bin/mktemp /tmp/smolt.XXXXX)
/bin/awk '{ srand(); if($2 == 1 && $3 == 1) print $1,int((rand() * 100) % 22 + 1),int((rand() * 100) % 27 + 1),substr($0,index($0,$4)); else print $0}' /etc/cron.d/smolt > $TMPFILE
/bin/cp $TMPFILE /etc/cron.d/smolt
/bin/rm -f $TMPFILE