Sophie

Sophie

distrib > PLD > ac > amd64 > media > dist > by-pkgid > 09c9f81a7d286215f6f7c785344baa47 > scriptlet

protolog-1.0.8-8.amd64.rpm

PREUN

/bin/sh
if [ "$1" = "0" ]; then
	{
if [ -f /var/lock/subsys/protolog ]; then
/sbin/service protolog stop 1>&2 || :;
fi };	/sbin/chkconfig --del protolog
fi

POSTIN

/bin/sh
if [ "$1" = 1 ]; then
	localip=$(/sbin/ip -f inet addr show | awk '/inet/{print $2}' | awk -F/ '{print $1}' | LC_ALL=C sort -u | xargs)
	sed -i -e "/^#IGNORE_ADDR=.*/s,.*,IGNORE_ADDR='$localip'," /etc/sysconfig/protolog
fi
/sbin/chkconfig --add protolog
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/protolog ] && . /etc/sysconfig/protolog
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/protolog ]; then
/sbin/service protolog restart 1>&2 || :;
else
echo 'Run "/sbin/service protolog start" to start protolog service.'
fi
fi };