diff --git a/debian/ngcp-www-csc.postinst b/debian/ngcp-www-csc.postinst index df2a59d..6fd741a 100644 --- a/debian/ngcp-www-csc.postinst +++ b/debian/ngcp-www-csc.postinst @@ -15,27 +15,6 @@ case "$1" in ;; esac -# removing old config files -if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then - dpkg-maintscript-helper rm_conffile \ - /etc/ngcp-config/templates/etc/apache2/sites-available/ngcp-www-csc.tt2 \ - -- "$@" - dpkg-maintscript-helper rm_conffile \ - /etc/ngcp-config/templates/etc/lsb_scripts/ngcp-www-csc.tt2 \ - -- "$@" - dpkg-maintscript-helper rm_conffile \ - /etc/ngcp-config/templates/etc/lsb_scripts/ngcp-www-csc.services \ - -- "$@" -fi - -if [ -d /etc/ngcp-config/templates/etc/lsb_scripts ]; then - rm -rf /etc/ngcp-config/templates/etc/lsb_scripts -fi - -if [ -d /etc/lsb_scripts ]; then - rm -rf /etc/lsb_scripts -fi - # remove default debian site if [ -e /etc/nginx/sites-enabled/default ]; then rm /etc/nginx/sites-enabled/default @@ -46,14 +25,6 @@ if [ ! -e /etc/nginx/sites-enabled/ngcp-www-csc ]; then # on a 3.0 system there is no such dir mkdir -p /etc/nginx/sites-enabled ln -s /etc/nginx/sites-available/ngcp-www-csc /etc/nginx/sites-enabled/ - # reload nginx - if [ -x /etc/init.d/nginx ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d nginx restart || true - else - /etc/init.d/nginx restart || true - fi - fi fi # dh_installdeb will replace this with shell code automatically diff --git a/debian/ngcp-www-csc.preinst b/debian/ngcp-www-csc.preinst index b2f7915..6221a68 100644 --- a/debian/ngcp-www-csc.preinst +++ b/debian/ngcp-www-csc.preinst @@ -16,42 +16,6 @@ set -e case "$1" in install|upgrade) - if [ -e /etc/apache2/sites-enabled/000-default ]; then - echo "Deactivating default site on apache" - rm /etc/apache2/sites-enabled/000-default - FLAG=1 - fi - if [ -e /etc/apache2/sites-enabled/ngcp-www-csc ]; then - echo "Deactivating ngcp-www-csc on apache" - rm /etc/apache2/sites-enabled/ngcp-www-csc - FLAG=1 - fi - if [ -e /etc/apache2/ports.conf ]; then - if grep '^[[:space:]]*Listen 443' \ - /etc/apache2/ports.conf &> /dev/null \ - || grep '^[[:space:]]*Listen 80' \ - /etc/apache2/ports.conf &> /dev/null; then - echo "Apache must not listen on 80 or 443 ports" - echo "Commenting 80/443 ports from /etc/apache2/ports.conf" - # don't listen on 80 or 443 - sed -e 's/^[[:space:]]*Listen 443/#Listen 443/' \ - -e 's/^[[:space:]]*Listen 80/#Listen 80/' \ - -e 's/^[[:space:]]*NameVirtualHost \*:80/#NameVirtualHost \*:80/' \ - -i /etc/apache2/ports.conf - FLAG=1 - fi - fi - if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then - dpkg-maintscript-helper rm_conffile \ - /etc/ngcp-config/templates/etc/apache2/sites-available/ngcp-www-csc.tt2 \ - -- "$@" - dpkg-maintscript-helper rm_conffile \ - /etc/ngcp-config/templates/etc/lsb_scripts/ngcp-www-csc.tt2 \ - -- "$@" - dpkg-maintscript-helper rm_conffile \ - /etc/ngcp-config/templates/etc/lsb_scripts/ngcp-www-csc.services \ - -- "$@" - fi # fix tmp perms if [ -d /tmp/csc ]; then echo "fixing /tmp/csc dir perms" @@ -68,17 +32,6 @@ case "$1" in ;; esac -if [ -n "$FLAG" ]; then - # restart apache - if [ -x /etc/init.d/apache2 ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d apache2 restart|| true - else - /etc/init.d/apache2 restart || true - fi - fi -fi - # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts.