diff options
Diffstat (limited to 'debian/sitesummary-client.postinst')
-rw-r--r-- | debian/sitesummary-client.postinst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/sitesummary-client.postinst b/debian/sitesummary-client.postinst new file mode 100644 index 0000000..88dddcc --- /dev/null +++ b/debian/sitesummary-client.postinst @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_get sitesummary/collector_url +URL="$RET" + +db_get sitesummary/site +SITE="$RET" + +# Only replace the site file if the content changed +if [ -f /etc/sitesummary/site ] ; then + OLDSITE=`cat /etc/sitesummary/site` + if [ "$SITE" != "$OLDSITE" ] ; then + echo "$SITE" > /etc/sitesummary/site + fi +else + echo "$SITE" > /etc/sitesummary/site +fi + +db_stop + +#DEBHELPER# |