#!/bin/sh set -e # N4D module must be enabled to make more easier # the installation process #dconf update case $1 in configure) if [ "$2" != "" ] ; then if dpkg --compare-versions $2 lt 0.12 then cp /usr/share/lliurex-lab/one-shot/* /etc/n4d/one-shot/ invoke-rc.d n4d restart || true fi fi if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke ensite lliurexlab fi invoke-rc.d apache2 reload || true if dpkg --compare-versions "$2" lt 0.9 ;then CNAME="/var/lib/dnsmasq/config/cname-server" if [ -f $CNAME ]; then DOMAIN=$(n4d-vars getvalues INTERNAL_DOMAIN | cut -d"'" -f2) SRVNAME=$(n4d-vars getvalues HOSTNAME | cut -d"'" -f2) echo "Fixing lliurexlab DNS ..." sed -i -e "/^cname=lliurexlab.*/d" $CNAME sed -i -e "/^$/d" $CNAME echo "\ncname=lliurexlab.$DOMAIN,$SRVNAME.$DOMAIN\n" >> $CNAME invoke-rc.d dnsmasq restart || true fi fi # #if [ ! -f /var/lib/dnsmasq/config/cname-lliurex-guard ]; then # echo "cname=lliurexlab.$DOMINI,$SRVNAME.$DOMINI" > /var/lib/dnsmasq/config/cname-lliurexlab # service dnsmasq restart #fi ;; *) echo "[DEBUG] Unknow action ..." ;; esac #DEBHELPER# exit 0