upgrade.sh
branchv0.6.x
changeset 264 04fea4d8b900
parent 167 bb58aedefa3a
child 483 fb210a116f18
equal deleted inserted replaced
263:07fdc93dde9f 264:04fea4d8b900
     8 PREFIX=/usr/local
     8 PREFIX=/usr/local
     9 
     9 
    10 PF_CONFDIR=$(postconf -h config_directory)
    10 PF_CONFDIR=$(postconf -h config_directory)
    11 PF_GID=$(id -g $(postconf -h mail_owner))
    11 PF_GID=$(id -g $(postconf -h mail_owner))
    12 POSTCONF=$(which postconf)
    12 POSTCONF=$(which postconf)
    13 DOVECOT_VERS=$(dovecot --version | awk -F . '{print $1 $2}')
    13 DOVECOT_VERS=$(dovecot --version | awk '{print $1}')
    14 LOCALE_DIR=${PREFIX}/share/locale
    14 LOCALE_DIR=${PREFIX}/share/locale
    15 DOC_DIR=${PREFIX}/share/doc/vmm
    15 DOC_DIR=${PREFIX}/share/doc/vmm
    16 if [ ${PREFIX} = "/usr" ]; then
    16 if [ ${PREFIX} = "/usr" ]; then
    17     MANDIR=${PREFIX}/share/man
    17     MANDIR=${PREFIX}/share/man
    18 else
    18 else
    27     echo "Run this script as root."
    27     echo "Run this script as root."
    28     exit 1
    28     exit 1
    29 fi
    29 fi
    30 
    30 
    31 # update config file before installing the new files.
    31 # update config file before installing the new files.
    32 ./update_config.py
    32 ./update_config.py ${DOVECOT_VERS:-'1.2.11'}
    33 rv=$?
    33 rv=$?
    34 if [ $rv -eq 2 ]; then
    34 if [ $rv -eq 2 ]; then
    35 	echo "please run the install.sh script"
    35 	echo "please run the install.sh script"
    36 	exit 1
    36 	exit 1
    37 elif [ $rv -eq 3 ]; then
    37 elif [ $rv -eq 3 ]; then