Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > ba26c1f99a2ad1cf0336ceb0fee4d615 > scriptlet

lstat-2.3.2-14.noarch.rpm

PREIN

/bin/sh
test -h /usr/share/lstat/doc || rm -rf /usr/share/lstat/doc

PREUN

/bin/sh
if [ "$1" = 0 ]; then
	if [ -f /var/lock/subsys/lstatd ]; then
		/etc/rc.d/init.d/lstatd stop >&2
	fi
	/sbin/chkconfig --del lstatd
fi

POSTIN

/bin/sh
/sbin/chkconfig --add lstatd
if [ -f /var/lock/subsys/lstatd ]; then
	/etc/rc.d/init.d/lstatd restart >&2
else
	echo "Run \"/etc/rc.d/init.d/lstatd start\" to start counting statistics."
fi

# this will fail if /proc not mounted
/usr/bin/Mkgraph.pl || :

Triggers

lstat <= 1:2.3.3-5

/bin/sh
# FIXME: the version in trigger never released?
if [ -s /etc/apache/conf.d/lstat.conf ]; then
	sed -i -e "s#/home/services/apache/lstat/#/usr/share/lstat/#g" /etc/apache/conf.d/lstat.conf
fi
if [ -s /etc/lstat/config ]; then
	sed -i -e "s#/home/services/apache/lstat/#/usr/share/lstat/#g" /etc/lstat/config
fi
if [ -s /home/services/apache/lstat/.htaccess ]; then
	mv /home/services/apache/lstat/.htaccess /usr/share/lstat/
fi

if [ -s /etc/httpd/httpd.conf/lstat.conf ]; then
	sed -i -e "s#/home/services/httpd/lstat/#/usr/share/lstat/#g" /etc/httpd/httpd.conf/lstat.conf
fi
if [ -s /etc/lstat/config ]; then
	sed -i -e "s#/home/services/httpd/lstat/#/usr/share/lstat/#g" /etc/lstat/config
fi
if [ -s /home/services/httpd/lstat/.htaccess ]; then
	mv /home/services/httpd/lstat/.htaccess /usr/share/lstat/
fi

lstat < 1:2.3.2-10.3

/bin/sh
# we put trigger on main package, because we can't trigger in new package
# this will create .rpmnew files when one installs -cgi package. but that's more than okay
if [ -f /etc/httpd/httpd.conf/lstat.conf.rpmsave ]; then
	install -d /etc/webapps/lstat
	mv -f /etc/httpd/httpd.conf/lstat.conf.rpmsave /etc/webapps/lstat/httpd.conf
fi

{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/httpd ] && . /etc/sysconfig/httpd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/httpd ]; then
/sbin/service httpd reload 1>&2 || :;
else
echo 'Run "/sbin/service httpd start" to start httpd service.'
fi
fi };