Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > d3a11f2b44d0222573db48fffe99ecd5 > scriptlet

smolt-1.4.2.2-3.fc14.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