Sophie

Sophie

distrib > Mageia > 9 > aarch64 > by-pkgid > 2d523182298b621e8e18798f1fcb225d > scriptlet

inn-2.6.4-3.mga9.aarch64.rpm

PREIN

/bin/sh
/usr/share/rpm-helper/add-user inn $1 news /etc/news /usr/sbin/nologin

PREUN

/bin/sh
/usr/share/rpm-helper/del-service inn $1 innd 


if [ $1 = 0 ]; then
    if [ -f /var/lib/news/history.dir ]; then
       rm -f /var/lib/news/history.*
    fi
fi

POSTIN

/bin/sh
/usr/bin/systemd-tmpfiles --create inn.conf 

/usr/share/rpm-helper/add-service inn $1 innd 


runuser -u news -g news touch \
    var/log/news/news.notice \
    var/log/news/news.err \
    var/log/news/news.crit \
    var/log/news/news \
    var/log/news/inn.status \
    var/log/news/innfeed.status
if test -e usr/lib/news/bin/control/version -o -e usr/lib/news/bin/inndstart ; then
    rm -f etc/news/inn.conf.OLD
    rm -f etc/news/newsfeeds.OLD
    usr/lib/news/bin/innupgrade etc/news
fi
if ! test -d /var/run/news ; then
    install -d -m 750 -o news -g news /var/run/news
fi

chown -R news:news /var/log/news*

if [ `hostname -f` ]; then
  if [ `cat /etc/news/inn.conf | grep '^server:' | wc -l` -lt 1 ]; then
    echo "server: `hostname -f`" >> /etc/news/inn.conf
  fi

  if [ -f /var/lib/news/history ]; then
        cd /var/lib/news
	/usr/bin/makedbz -s `wc -l <history` -f history
        for i in dir hash index pag; do
                [ -f history.n.$i ] && mv history.n.$i history.$i
        done
        chown news:news history.*
        chmod 644 history.*
  else
        cd /var/lib/news
        cp /dev/null history
        /usr/bin/makehistory 
	/usr/bin/makedbz -s `wc -l <history` -f history
        for i in dir hash index pag; do
                [ -f history.n.$i ] && mv history.n.$i history.$i
        done
        chown news:news history history.*
        chmod 644 history history.*
  fi
else
  echo "Network misconfigured, manual setup required..."
fi

POSTUN

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