Changeset 4558


Ignore:
Timestamp:
May 4, 2017, 9:25:35 AM (2 years ago)
Author:
hectorgh
Message:

making sure cname file exists

Location:
python-llxvars/trunk/fuentes/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python-llxvars/trunk/fuentes/debian/changelog

    r4521 r4558  
     1python-llxvars (0.9.44) xenial; urgency=high
     2
     3  * Making sure cname file exists when executing postinst.
     4
     5 -- Hector Garcia Huerta <hectorgh@gmail.com>  Thu, 04 May 2017 09:23:23 +0200
     6
    17python-llxvars (0.9.43) xenial; urgency=high
    28
  • python-llxvars/trunk/fuentes/debian/postinst

    r4532 r4558  
    1818# the debian-policy package
    1919
    20 CNAMEPATH="/var/lib/dnsmasq/config/cname-server"
    21 
    2220
    2321case "$1" in
     
    3028
    3129                        NEW_ALIAS="cname=admin-center.${INTERNAL_DOMAIN},${HOSTNAME}.${INTERNAL_DOMAIN}";
    32                         FOUND=`cat $CNAMEPATH | grep "admin-center" | wc -l`
    33                         if [ ${FOUND} -eq 0 ]; then
    34                             echo ${NEW_ALIAS} >> $CNAMEPATH
    35                             systemctl restart dnsmasq || true
     30                        CNAMEPATH="/var/lib/dnsmasq/config/cname-server"
     31                        if [ -e $CNAMEPATH ]; then
     32                                FOUND=`cat $CNAMEPATH | grep "admin-center" | wc -l`
     33                                if [ ${FOUND} -eq 0 ]; then
     34                                    echo ${NEW_ALIAS} >> $CNAMEPATH
     35                                    systemctl restart dnsmasq || true
     36                                fi
    3637                        fi
    3738                fi
Note: See TracChangeset for help on using the changeset viewer.