summarylogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorMartina Pietruschka2017-01-09 06:17:42 +0100
committerMartina Pietruschka2017-01-09 06:17:42 +0100
commitc803c22563af579037398abd6a43a924e9d1cdff (patch)
tree40467ded666870e6f1ad93bc07c4e8d3585c284e /install
parentb35b401f3b2279dd0c7e3ab2fa69e7f1d2aa9bc0 (diff)
downloadaur-c803c22563af579037398abd6a43a924e9d1cdff.tar.gz
run ical gateway as nobody
Diffstat (limited to 'install')
-rw-r--r--install20
1 files changed, 19 insertions, 1 deletions
diff --git a/install b/install
index 34458550b7c9..ff87458301e4 100644
--- a/install
+++ b/install
@@ -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
}