Sophie

Sophie

distrib > Scientific%20Linux > 5x > i386 > by-pkgid > d1b788842793ba056a9f6eee1cc36613 > scriptlet

inn-2.4.3-9.el5.i386.rpm

PREUN

/bin/sh
if [ $1 = 0 ]; then
    service innd stop > /dev/null 2>&1
    /sbin/chkconfig --del innd
    if [ -f /var/lib/news/history.dir ]; then
       rm -f /var/lib/news/history.*
    fi
fi

POSTIN

/bin/sh
/sbin/chkconfig --add innd
#makedbz executed when innd is started first time after update
#(see bz #225076 for details)
#su news -c '/usr/lib/news/bin/makedbz -i -o'

umask 002
touch /var/log/news/news.notice
touch /var/log/news/news.crit
touch /var/log/news/news.err
chown -R news:news /var/log/news*

POSTUN

/bin/sh
if [ "$1" -ge 1 ]; then
    service innd condrestart > /dev/null 2>&1
fi
exit 0

Triggers

inn < 2.3.0

/bin/sh
service innd stop > /dev/null 2>&1
exit 0

sysklogd

/bin/sh
if [ -f /etc/syslog.conf ]; then
  if ! grep -q INN /etc/syslog.conf; then
    sed 's/mail.none;/mail.none;news.none;/' < /etc/syslog.conf > /etc/syslog.conf.inn
    mv /etc/syslog.conf.inn /etc/syslog.conf

    echo '' \
       >> /etc/syslog.conf
    echo '#' \
       >> /etc/syslog.conf
    echo '# INN' \
       >> /etc/syslog.conf
    echo '#' \
       >> /etc/syslog.conf
    echo 'news.=crit                                        /var/log/news/news.crit'   >> /etc/syslog.conf
    echo 'news.=err                                         /var/log/news/news.err'    >> /etc/syslog.conf
    echo 'news.notice                                       /var/log/news/news.notice' >> /etc/syslog.conf
    fi
  if [ -f /var/run/syslog.pid ]; then
    kill -HUP `cat /var/run/syslog.pid` 2> /dev/null ||:
  fi
fi