summarylogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorMartina Pietruschka2017-02-05 16:45:34 +0100
committerMartina Pietruschka2017-02-05 16:45:34 +0100
commitfa3289512c68486d52c147df30fba47a09202f95 (patch)
tree166453d006a685424f987ab2bee028c2d479616b /install
parent622d928a83bf51981625c65af8c7a26535b2a9b9 (diff)
downloadaur-fa3289512c68486d52c147df30fba47a09202f95.tar.gz
only set configurations that match 100%
Diffstat (limited to 'install')
-rw-r--r--install13
1 files changed, 8 insertions, 5 deletions
diff --git a/install b/install
index ff87458301e4..dcab4bd38508 100644
--- a/install
+++ b/install
@@ -1,8 +1,11 @@
#!/bin/bash
-function setconf() {
+function zarafa_cfg_set() {
# 1: field / 2: value / 3: file
- sed -i "s|^#*\s*\($1\).*|\1 = $2|" $3
+ # Replaces optional comments and spaces
+ # "# name = value" => "name = newvalue"
+ #
+ sed -i "s|^#*\s*\($1\)\s*\=.*|\1 = $2|" $3
}
# care about existing files
@@ -66,7 +69,7 @@ post_upgrade() {
case "$oldPackageVersion" in
7.2.1*)
- installbasics
+ installbasics
# CONFIG
# => defaults
@@ -82,8 +85,8 @@ post_upgrade() {
# don't run gateway and ical as zarafa user - zarafa would grand access to all stores
for cfg in /etc/zarafa/{gateway,ical}.cfg; do
- setconf "run_as_user" "nobody" "${cfg}"
- setconf "run_as_group" "nobody" "${cfg}"
+ zarafa_cfg_set "run_as_user" "nobody" "${cfg}"
+ zarafa_cfg_set "run_as_group" "nobody" "${cfg}"
done
echo