From: František Dvořák Date: Fri, 7 Mar 2014 23:01:01 +0000 (+0100) Subject: Better install scripts (debhelper on the start, simple if instead of case, ...). X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=ba83d01e95fad003364bc6f1d91140cac9f7e633;p=rOCCI-packaging.git Better install scripts (debhelper on the start, simple if instead of case, ...). --- diff --git a/rocci-server/debian/postinst b/rocci-server/debian/postinst index aa148a9..ee48710 100644 --- a/rocci-server/debian/postinst +++ b/rocci-server/debian/postinst @@ -1,13 +1,11 @@ #!/bin/sh set -e -case "$1" in -configure|reconfigure) - ;; -*) +#DEBHELPER# + +if [ "$1" != "configure" -a "$1" != "reconfigure" ]; then exit 0 - ;; -esac +fi conf="/etc/apache2/sites-available/occi-ssl" econf="/etc/apache2/sites-enabled/occi-ssl" @@ -37,7 +35,6 @@ else echo "Hostname could not be determined! Please update 'ServerName' and 'ROCCI_SERVER_HOSTNAME' in $conf." fi -# apache reload if [ -n "$2" ]; then # we're upgrading. test if we're enabled, and if so, restart to reload the module. if [ -e "$econf" ]; then @@ -53,4 +50,4 @@ if [ -e /etc/apache2/apache2.conf ]; then reload_apache fi -#DEBHELPER# +exit 0 diff --git a/rocci-server/debian/postrm b/rocci-server/debian/prerm similarity index 64% rename from rocci-server/debian/postrm rename to rocci-server/debian/prerm index 7c9d63e..df1e3e8 100644 --- a/rocci-server/debian/postrm +++ b/rocci-server/debian/prerm @@ -1,16 +1,14 @@ #!/bin/sh set -e -case "$1" in -remove|purge) - ;; -*) +#DEBHELPER# + +if [ "$1" != "remove" -a "$1" != "purge" ]; then exit 0 - ;; -esac +fi if [ -e /etc/apache2/apache2.conf ]; then a2dissite occi-ssl || : fi -#DEBHELPER# +exit 0