X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=debian%2Froundcube-core.postinst;h=aed1d06cb896b05c1691b58b524cb601f314a7a4;hb=3ead980f40dd1cb16f53a9feed3ec5a8d94d1913;hp=843a1859a9b38ea87fc4541bb1bacf1280a4112f;hpb=933da5831e3bbf633c254a1cd23c90ffc297181c;p=roundcube.git diff --git a/debian/roundcube-core.postinst b/debian/roundcube-core.postinst index 843a185..aed1d06 100644 --- a/debian/roundcube-core.postinst +++ b/debian/roundcube-core.postinst @@ -100,11 +100,22 @@ EOF done # Put hosts, language and key in main.inc.php - cat /usr/share/roundcube/main.inc.php.dist | \ - awk "/^.rcmail_config\['default_host'\] =/ {print \$1\" = ${hosts};\" ; next} - /^.rcmail_config\['des_key'\] =/ {print \$1\" = '${deskey}';\" ; next} - /^.rcmail_config\['language'\] =/ {print \$1\" = '${language}';\" ; next} - {print}" >> $CONFFILE.ucftmp + cat /usr/share/roundcube/main.inc.php.dist | while read line; do + case "$line" in + "\$rcmail_config['default_host'] = "*) + printf "\$rcmail_config['default_host'] = %s;\n" "${hosts}" + ;; + "\$rcmail_config['des_key'] = "*) + printf "\$rcmail_config['des_key'] = '%s';\n" "${deskey}" + ;; + "\$rcmail_config['language'] = "*) + printf "\$rcmail_config['language'] = '%s';\n" "${language}" + ;; + *) + printf "%s\n" "$line" + ;; + esac + done >> $CONFFILE.ucftmp ucf --debconf-ok $CONFFILE.ucftmp $CONFFILE chown root:www-data $CONFFILE