Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main > by-pkgid > 630aa7e6173fdfc110769ec5c6bbc0ba > scriptlet

webmin-0.80-18mdk.noarch.rpm

PREUN

/bin/sh
if [ "$1" = 0 ]; then
	grep root=/usr/share/webmin /etc/webmin/miniserv.conf >/dev/null 2>&1
	if [ "$?" = 0 ]; then
		# RPM is being removed, and no new version of webmin
		# has taken it's place. Stop the server
		/etc/rc.d/init.d/webmin stop >/dev/null 2>&1
	fi
fi
chkconfig --del webmin

POSTIN

/bin/sh
if [ "$1" != 1 ]; then
	# Upgrading the RPM, so stop the old webmin properly
	/etc/rc.d/init.d/webmin stop >/dev/null 2>&1
	touch /etc/webmin/postinstall_pending
fi

chkconfig --add webmin
rm -f /var/lock/subsys/webmin
/etc/rc.d/init.d/webmin start > /dev/null 2>&1

POSTUN

/bin/sh
if [ "$1" = 0 ]; then
	grep root=/usr/share/webmin /etc/webmin/miniserv.conf >/dev/null 2>&1
	if [ "$?" = 0 ]; then
		# RPM is being removed, and no new version of webmin
		# has taken it's place. Delete the config files
		rm -rf /etc/webmin /var/webmin /var/log/webmin
	fi
fi