Line | |
---|
1 | #!/bin/sh |
---|
2 | set -e |
---|
3 | # N4D module must be enabled to make more easier |
---|
4 | # the installation process |
---|
5 | #dconf update |
---|
6 | |
---|
7 | case $1 in |
---|
8 | configure) |
---|
9 | |
---|
10 | if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then |
---|
11 | . /usr/share/apache2/apache2-maintscript-helper |
---|
12 | apache2_invoke ensite lliurexlab |
---|
13 | fi |
---|
14 | |
---|
15 | invoke-rc.d apache2 reload || true |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | if dpkg --compare-versions "$2" lt 0.9 ;then |
---|
21 | |
---|
22 | CNAME="/var/lib/dnsmasq/config/cname-server" |
---|
23 | |
---|
24 | if [ -f $CNAME ]; then |
---|
25 | |
---|
26 | DOMAIN=$(n4d-vars getvalues INTERNAL_DOMAIN | cut -d"'" -f2) |
---|
27 | SRVNAME=$(n4d-vars getvalues HOSTNAME | cut -d"'" -f2) |
---|
28 | echo "Fixing lliurexlab DNS ..." |
---|
29 | sed -i -e "/^cname=lliurexlab.*/d" $CNAME |
---|
30 | sed -i -e "/^$/d" $CNAME |
---|
31 | echo "\ncname=lliurexlab.$DOMAIN,$SRVNAME.$DOMAIN\n" >> $CNAME |
---|
32 | |
---|
33 | invoke-rc.d dnsmasq restart || true |
---|
34 | |
---|
35 | fi |
---|
36 | |
---|
37 | fi |
---|
38 | |
---|
39 | # |
---|
40 | |
---|
41 | #if [ ! -f /var/lib/dnsmasq/config/cname-lliurex-guard ]; then |
---|
42 | # echo "cname=lliurexlab.$DOMINI,$SRVNAME.$DOMINI" > /var/lib/dnsmasq/config/cname-lliurexlab |
---|
43 | # service dnsmasq restart |
---|
44 | #fi |
---|
45 | |
---|
46 | |
---|
47 | ;; |
---|
48 | *) |
---|
49 | echo "[DEBUG] Unknow action ..." |
---|
50 | ;; |
---|
51 | esac |
---|
52 | |
---|
53 | #DEBHELPER# |
---|
54 | |
---|
55 | exit 0 |
---|
56 | |
---|
57 | |
---|
Note: See
TracBrowser
for help on using the repository browser.