diff options
author | Martina Pietruschka | 2017-01-09 06:17:42 +0100 |
---|---|---|
committer | Martina Pietruschka | 2017-01-09 06:17:42 +0100 |
commit | c803c22563af579037398abd6a43a924e9d1cdff (patch) | |
tree | 40467ded666870e6f1ad93bc07c4e8d3585c284e /install | |
parent | b35b401f3b2279dd0c7e3ab2fa69e7f1d2aa9bc0 (diff) | |
download | aur-c803c22563af579037398abd6a43a924e9d1cdff.tar.gz |
run ical gateway as nobody
Diffstat (limited to 'install')
-rw-r--r-- | install | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1,5 +1,10 @@ #!/bin/bash +function setconf() { + # 1: field / 2: value / 3: file + sed -i "s|^#*\s*\($1\).*|\1 = $2|" $3 +} + # care about existing files function installdir() { local owner="$1" @@ -65,7 +70,7 @@ post_upgrade() { # CONFIG # => defaults - for cfg in /usr/share/doc/zarafa/example-config/*.cfg; do + for cfg in /usr/share/doc/zarafa/example-config/*.cfg; do install --backup=simple -o zarafa -g zarafa -m 0600 ${cfg} /etc/zarafa done @@ -74,6 +79,19 @@ post_upgrade() { *) ;; esac + + # 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}" + done + + echo + echo "Please restart zarafa gateway and ical services" + echo + echo " $ systemctl restart zarafa-gateway" + echo " $ systemctl restart zarafa-ical" + echo return 0 } |