Sophie

Sophie

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

phpMyAdmin-2.10.0.2-1.noarch.rpm

Triggers

apache1 < 1.3.37-3

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register apache phpMyAdmin
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/apache/webapps.d/phpMyAdmin.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/phpMyAdmin.conf ]; then 
	/usr/sbin/webapp unregister apache phpMyAdmin
	{
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 phpMyAdmin
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/phpMyAdmin.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/phpMyAdmin.conf ]; then 
	/usr/sbin/webapp unregister httpd phpMyAdmin
	{
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
for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
	cp $i $i.backup
	sed -i -e "s#/home/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	sed -i -e "s#/home/services/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	echo "File changed by trigger: $i (backup: $i.backup)"
done

apache-base

/bin/sh
# rescue app config from various old locations
if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /etc/phpMyAdmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi

# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*phpMyAdmin.conf/d" /etc/httpd/httpd.conf
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/phpMyAdmin.conf.rpmsave ]; then
	cp -f /etc/webapps/phpMyAdmin/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/phpMyAdmin.conf.rpmsave /etc/webapps/phpMyAdmin/httpd.conf
fi

rm -f /etc/httpd/httpd.conf/99_phpMyAdmin.conf
/usr/sbin/webapp register httpd phpMyAdmin
{
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 };

apache < 2.2.0

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

phpMyAdmin <= 2.5.3-2

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

phpMyAdmin < 2.7.0-pl1.2.5

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/httpd/webapps.d/phpMyAdmin.conf ]; then 
	/usr/sbin/webapp unregister httpd phpMyAdmin
	{
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
for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
	cp $i $i.backup
	sed -i -e "s#/home/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	sed -i -e "s#/home/services/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	echo "File changed by trigger: $i (backup: $i.backup)"
done

apache1-base

/bin/sh
# rescue app config from various old locations
if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /etc/phpMyAdmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi

# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*phpMyAdmin.conf/d" /etc/httpd/httpd.conf
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/phpMyAdmin.conf.rpmsave ]; then
	cp -f /etc/webapps/phpMyAdmin/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/phpMyAdmin.conf.rpmsave /etc/webapps/phpMyAdmin/httpd.conf
fi

rm -f /etc/httpd/httpd.conf/99_phpMyAdmin.conf
/usr/sbin/webapp register httpd phpMyAdmin
{
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 };

apache1 < 1.3.37-3

/bin/sh
 
if [ "$1" = "1" ] && [ "$2" = "1" ]; then
	/usr/sbin/webapp register apache phpMyAdmin
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/apache/webapps.d/phpMyAdmin.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/phpMyAdmin.conf ]; then 
	/usr/sbin/webapp unregister apache phpMyAdmin
	{
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 phpMyAdmin
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/phpMyAdmin.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/phpMyAdmin.conf ]; then 
	/usr/sbin/webapp unregister httpd phpMyAdmin
	{
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
for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
	cp $i $i.backup
	sed -i -e "s#/home/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	sed -i -e "s#/home/services/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	echo "File changed by trigger: $i (backup: $i.backup)"
done

apache-base

/bin/sh
# rescue app config from various old locations
if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /etc/phpMyAdmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi

# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*phpMyAdmin.conf/d" /etc/httpd/httpd.conf
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/phpMyAdmin.conf.rpmsave ]; then
	cp -f /etc/webapps/phpMyAdmin/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/phpMyAdmin.conf.rpmsave /etc/webapps/phpMyAdmin/httpd.conf
fi

rm -f /etc/httpd/httpd.conf/99_phpMyAdmin.conf
/usr/sbin/webapp register httpd phpMyAdmin
{
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 };

phpMyAdmin <= 2.5.3-2

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

phpMyAdmin < 2.7.0-pl1.2.5

/bin/sh
 
# remove link if either of the packages are gone 
if [ -n "" ] || [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/apache/webapps.d/phpMyAdmin.conf ]; then 
	/usr/sbin/webapp unregister apache phpMyAdmin
	{
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 phpMyAdmin
fi
# reload webserver if the config symlink is there and skip reload if webserver is upgraded
if [ -L /etc/httpd/webapps.d/phpMyAdmin.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/phpMyAdmin.conf ]; then 
	/usr/sbin/webapp unregister httpd phpMyAdmin
	{
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
for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
	cp $i $i.backup
	sed -i -e "s#/home/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	sed -i -e "s#/home/services/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	echo "File changed by trigger: $i (backup: $i.backup)"
done

apache1-base

/bin/sh
# rescue app config from various old locations
if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /etc/phpMyAdmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi

# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*phpMyAdmin.conf/d" /etc/httpd/httpd.conf
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/phpMyAdmin.conf.rpmsave ]; then
	cp -f /etc/webapps/phpMyAdmin/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/phpMyAdmin.conf.rpmsave /etc/webapps/phpMyAdmin/httpd.conf
fi

rm -f /etc/httpd/httpd.conf/99_phpMyAdmin.conf
/usr/sbin/webapp register httpd phpMyAdmin
{
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 };

apache < 2.2.0

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

phpMyAdmin <= 2.5.3-2

/bin/sh
for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
	cp $i $i.backup
	sed -i -e "s#/home/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	sed -i -e "s#/home/services/httpd/html/myadmin#/usr/share/phpMyAdmin#g" $i
	echo "File changed by trigger: $i (backup: $i.backup)"
done

phpMyAdmin < 2.7.0-pl1.2.5

/bin/sh
# rescue app config from various old locations
if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi
if [ -f /etc/phpMyAdmin/config.inc.php.rpmsave ]; then
	mv -f /etc/webapps/phpMyAdmin/config.inc.php{,.rpmnew}
	mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/webapps/phpMyAdmin/config.inc.php
fi

# nuke very-old config location (this mostly for Ra)
if [ -f /etc/httpd/httpd.conf ]; then
	sed -i -e "/^Include.*phpMyAdmin.conf/d" /etc/httpd/httpd.conf
fi

# migrate from httpd (apache2) config dir
if [ -f /etc/httpd/phpMyAdmin.conf.rpmsave ]; then
	cp -f /etc/webapps/phpMyAdmin/httpd.conf{,.rpmnew}
	mv -f /etc/httpd/phpMyAdmin.conf.rpmsave /etc/webapps/phpMyAdmin/httpd.conf
fi

rm -f /etc/httpd/httpd.conf/99_phpMyAdmin.conf
/usr/sbin/webapp register httpd phpMyAdmin
{
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 };