Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 8e17fb18e3ea042064e1c727084854fc > scriptlet

mediawiki-1.8.3-1.amd64.rpm

Triggers

apache1 < 1.3.37-3

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register apache mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/apache/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache1-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/apache/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister apache mediawiki
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache1 < 1.3.37-3

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register httpd mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
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 || :;
fi
fi };
fi

apache1-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/httpd/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister httpd mediawiki
	{
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 || :;
fi
fi };
fi

apache < 2.2.0

/bin/sh
# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*mediawiki.conf/d" /etc/httpd/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/mediawiki.conf.rpmsave ]; then
	cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/mediawiki.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from apache-config macros
if [ -f /etc/mediawiki/apache.conf.rpmsave ]; then
	if [ -d /etc/apache/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/apache.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/apache.conf
	fi

	if [ -d /etc/httpd/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	fi
	rm -f /etc/mediawiki/apache.conf.rpmsave
fi

# migrating from earlier apache-config?
if [ -L /etc/apache/conf.d/99_mediawiki.conf ] || [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
	if [ -L /etc/apache/conf.d/99_mediawiki.conf ]; then
		rm -f /etc/apache/conf.d/99_mediawiki.conf
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
		rm -f /etc/httpd/httpd.conf/99_mediawiki.conf
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
else
	# no earlier registration. assume migration from Ra
	if [ -d /etc/apache/webapps.d ]; then
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -d /etc/httpd/webapps.d ]; then
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
fi

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

apache-base

/bin/sh
RPM_SCRIPTVERBOSITY=5 
[ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm 
if [ -x /usr/bin/banner.sh ]; then 
	CMD="/usr/bin/banner.sh --stderr $([ $RPM_SCRIPTVERBOSITY -ge 5 ] && echo -s) -m mediawiki-1.6" 
else 
	CMD="cat >&2" 
fi 
eval $CMD <





apache < 2.2.0

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register apache mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/apache/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/apache/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister apache mediawiki
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

mediawiki < 1.5.3-0.2

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register httpd mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
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 || :;
fi
fi };
fi

mediawiki < 1.6.0

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/httpd/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister httpd mediawiki
	{
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 || :;
fi
fi };
fi

apache1 < 1.3.37-3

/bin/sh
# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*mediawiki.conf/d" /etc/httpd/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/mediawiki.conf.rpmsave ]; then
	cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/mediawiki.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from apache-config macros
if [ -f /etc/mediawiki/apache.conf.rpmsave ]; then
	if [ -d /etc/apache/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/apache.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/apache.conf
	fi

	if [ -d /etc/httpd/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	fi
	rm -f /etc/mediawiki/apache.conf.rpmsave
fi

# migrating from earlier apache-config?
if [ -L /etc/apache/conf.d/99_mediawiki.conf ] || [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
	if [ -L /etc/apache/conf.d/99_mediawiki.conf ]; then
		rm -f /etc/apache/conf.d/99_mediawiki.conf
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
		rm -f /etc/httpd/httpd.conf/99_mediawiki.conf
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
else
	# no earlier registration. assume migration from Ra
	if [ -d /etc/apache/webapps.d ]; then
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -d /etc/httpd/webapps.d ]; then
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
fi

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

apache1-base

/bin/sh
RPM_SCRIPTVERBOSITY=5 
[ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm 
if [ -x /usr/bin/banner.sh ]; then 
	CMD="/usr/bin/banner.sh --stderr $([ $RPM_SCRIPTVERBOSITY -ge 5 ] && echo -s) -m mediawiki-1.6" 
else 
	CMD="cat >&2" 
fi 
eval $CMD <





apache1 < 1.3.37-3

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register apache mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/apache/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache1-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/apache/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister apache mediawiki
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache < 2.2.0

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register httpd mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
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 || :;
fi
fi };
fi

apache-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/httpd/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister httpd mediawiki
	{
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 || :;
fi
fi };
fi

apache < 2.2.0

/bin/sh
# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*mediawiki.conf/d" /etc/httpd/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/mediawiki.conf.rpmsave ]; then
	cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/mediawiki.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from apache-config macros
if [ -f /etc/mediawiki/apache.conf.rpmsave ]; then
	if [ -d /etc/apache/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/apache.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/apache.conf
	fi

	if [ -d /etc/httpd/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	fi
	rm -f /etc/mediawiki/apache.conf.rpmsave
fi

# migrating from earlier apache-config?
if [ -L /etc/apache/conf.d/99_mediawiki.conf ] || [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
	if [ -L /etc/apache/conf.d/99_mediawiki.conf ]; then
		rm -f /etc/apache/conf.d/99_mediawiki.conf
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
		rm -f /etc/httpd/httpd.conf/99_mediawiki.conf
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
else
	# no earlier registration. assume migration from Ra
	if [ -d /etc/apache/webapps.d ]; then
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -d /etc/httpd/webapps.d ]; then
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
fi

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

apache-base

/bin/sh
RPM_SCRIPTVERBOSITY=5 
[ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm 
if [ -x /usr/bin/banner.sh ]; then 
	CMD="/usr/bin/banner.sh --stderr $([ $RPM_SCRIPTVERBOSITY -ge 5 ] && echo -s) -m mediawiki-1.6" 
else 
	CMD="cat >&2" 
fi 
eval $CMD <





mediawiki < 1.5.3-0.2

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register apache mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/apache/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

mediawiki < 1.6.0

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/apache/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister apache mediawiki
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache1 < 1.3.37-3

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register httpd mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
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 || :;
fi
fi };
fi

apache1-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/httpd/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister httpd mediawiki
	{
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 || :;
fi
fi };
fi

apache1 < 1.3.37-3

/bin/sh
# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*mediawiki.conf/d" /etc/httpd/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/mediawiki.conf.rpmsave ]; then
	cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/mediawiki.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from apache-config macros
if [ -f /etc/mediawiki/apache.conf.rpmsave ]; then
	if [ -d /etc/apache/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/apache.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/apache.conf
	fi

	if [ -d /etc/httpd/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	fi
	rm -f /etc/mediawiki/apache.conf.rpmsave
fi

# migrating from earlier apache-config?
if [ -L /etc/apache/conf.d/99_mediawiki.conf ] || [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
	if [ -L /etc/apache/conf.d/99_mediawiki.conf ]; then
		rm -f /etc/apache/conf.d/99_mediawiki.conf
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
		rm -f /etc/httpd/httpd.conf/99_mediawiki.conf
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
else
	# no earlier registration. assume migration from Ra
	if [ -d /etc/apache/webapps.d ]; then
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -d /etc/httpd/webapps.d ]; then
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
fi

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

apache1-base

/bin/sh
RPM_SCRIPTVERBOSITY=5 
[ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm 
if [ -x /usr/bin/banner.sh ]; then 
	CMD="/usr/bin/banner.sh --stderr $([ $RPM_SCRIPTVERBOSITY -ge 5 ] && echo -s) -m mediawiki-1.6" 
else 
	CMD="cat >&2" 
fi 
eval $CMD <





apache < 2.2.0

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register apache mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/apache/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/apache/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister apache mediawiki
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache reload 1>&2 || :;
fi
fi };
fi

apache < 2.2.0

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register httpd mediawiki
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/mediawiki.conf ] && [ "$2" -lt "2" ]; then
	{
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 || :;
fi
fi };
fi

apache-base

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/httpd/webapps.d/mediawiki.conf ]; then 
	/usr/sbin/webapp unregister httpd mediawiki
	{
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 || :;
fi
fi };
fi

mediawiki < 1.5.3-0.2

/bin/sh
# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*mediawiki.conf/d" /etc/httpd/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/mediawiki.conf.rpmsave ]; then
	cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/mediawiki.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	/usr/sbin/webapp register httpd mediawiki
	httpd_reload=1
fi

# migrate from apache-config macros
if [ -f /etc/mediawiki/apache.conf.rpmsave ]; then
	if [ -d /etc/apache/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/apache.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/apache.conf
	fi

	if [ -d /etc/httpd/webapps.d ]; then
		cp -f /etc/webapps/mediawiki/httpd.conf{,.rpmnew}
		cp -f /etc/mediawiki/apache.conf.rpmsave /etc/webapps/mediawiki/httpd.conf
	fi
	rm -f /etc/mediawiki/apache.conf.rpmsave
fi

# migrating from earlier apache-config?
if [ -L /etc/apache/conf.d/99_mediawiki.conf ] || [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
	if [ -L /etc/apache/conf.d/99_mediawiki.conf ]; then
		rm -f /etc/apache/conf.d/99_mediawiki.conf
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -L /etc/httpd/httpd.conf/99_mediawiki.conf ]; then
		rm -f /etc/httpd/httpd.conf/99_mediawiki.conf
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
else
	# no earlier registration. assume migration from Ra
	if [ -d /etc/apache/webapps.d ]; then
		/usr/sbin/webapp register apache mediawiki
		apache_reload=1
	fi
	if [ -d /etc/httpd/webapps.d ]; then
		/usr/sbin/webapp register httpd mediawiki
		httpd_reload=1
	fi
fi

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

mediawiki < 1.6.0

/bin/sh
RPM_SCRIPTVERBOSITY=5 
[ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm 
if [ -x /usr/bin/banner.sh ]; then 
	CMD="/usr/bin/banner.sh --stderr $([ $RPM_SCRIPTVERBOSITY -ge 5 ] && echo -s) -m mediawiki-1.6" 
else 
	CMD="cat >&2" 
fi 
eval $CMD <