Package apache2-mod_passenger: Скрипты

Post install

# Reconfigure Apache2:
/usr/sbin/a2chkconfig ||:

if [ -e /etc/httpd2/conf/mods-enabled/passenger.load ]; then
    CONF_OK=0
    /usr/sbin/apachectl2 configtest && CONF_OK=1 ||:
    if [ "$CONF_OK" = "1" ]; then
	service httpd2 condrestart ||:
    else
	echo "Some errors detected in Apache2 configuration!"
	echo "To use mod_passenger check configuration and start httpd2 service."
	echo
    fi
else
    echo "Apache2 mod_passenger module had been installed, but does't enabled."
    echo "Check /etc/httpd2/conf/mods-start.d directory for files with 'passenger=no' lines."
    echo
fi
Post uninstall

# Reconfigure Apache2:
/usr/sbin/a2chkconfig ||:
if [ "$1" = "0" ] ; then # last uninstall
    CONF_OK=0
    /usr/sbin/apachectl2 configtest && CONF_OK=1 ||:
    if [ "$CONF_OK" = "1" ]; then
	service httpd2 condrestart ||:
    else
	echo "Some errors detected in Apache2 configuration!"
	echo "To complete mod_passenger uninstalling check configuration and restart httpd2 service."
	echo
    fi
fi
Pre uninstall

1
2
3
if [ "$1" = "0" ] ; then # last uninstall
    [ -e /etc/httpd2/conf/mods-enabled/passenger.load ] && /usr/sbin/a2dismod passenger 2>&1 >/dev/null ||:
fi