Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joanne Hugé
slapos
Commits
ba8f055a
Commit
ba8f055a
authored
May 27, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cover several "user=zimbra" cases in configuration files
parent
2e2a9405
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
software/zimbra/buildout.cfg
software/zimbra/buildout.cfg
+16
-4
No files found.
software/zimbra/buildout.cfg
View file @
ba8f055a
...
@@ -199,7 +199,6 @@ git-executable = ${git:location}/bin/git
...
@@ -199,7 +199,6 @@ git-executable = ${git:location}/bin/git
[zimbra-sources-search-replace]
[zimbra-sources-search-replace]
# replace all remaining occurrences of /opt/zimbra
recipe = plone.recipe.command
recipe = plone.recipe.command
ZIMBRA_HOME = ${environment:ZIMBRA_HOME}
ZIMBRA_HOME = ${environment:ZIMBRA_HOME}
PERL_BINARY = ${perl:location}/bin/perl
PERL_BINARY = ${perl:location}/bin/perl
...
@@ -208,13 +207,26 @@ update-command = ${:command}
...
@@ -208,13 +207,26 @@ update-command = ${:command}
command =
command =
cd ${zimbra-sources:location}
cd ${zimbra-sources:location}
find . -name LocalConfig.java -exec sed -i 's#= FS + "opt" + FS + "zimbra"#= "${:ZIMBRA_HOME}"#g' {} \;
find . -name LocalConfig.java -exec sed -i 's#= FS + "opt" + FS + "zimbra"#= "${:ZIMBRA_HOME}"#g' {} \;
# sixteen backslashes, yeah.
ZIMBRA_HOME_WITH_BACKSLASHES=`echo $ZIMBRA_HOME | sed "s#/#\\\\\\\\\\\\\\\\/#g"`
# for most cases:
SUB1='s#/opt/zimbra#${:ZIMBRA_HOME}#g'
SUB1='s#/opt/zimbra#${:ZIMBRA_HOME}#g'
# perl scripts shebang:
SUB2='1{s|^#!/usr/bin/perl|#!${:PERL_BINARY}|}'
SUB2='1{s|^#!/usr/bin/perl|#!${:PERL_BINARY}|}'
# zmamavisdctl and friends:
SUB3="s#\\\\/opt\\\\/zimbra#$ZIMBRA_HOME_WITH_BACKSLASHES#g"
GROUP_NAME=`id -gn`
GROUP_NAME=`id -gn`
USER_NAME=`id -un`
USER_NAME=`id -un`
find . -name '.git' -prune -o -type f -exec sed -i "$SUB1;$SUB2" {} \;
# replace all remaining occurrences of /opt/zimbra
sed -i "s|\$daemon_user *= *'zimbra';|\$daemon_user = '$USER_NAME';|" ZimbraServer/conf/amavisd.conf.in
find . -name '.git' -prune -o -type f -exec sed -i "$SUB1;$SUB2;$SUB3" {} \;
sed -i "s|\$daemon_group *= *'zimbra';|\$daemon_group = '$GROUP_NAME';|" ZimbraServer/conf/amavisd.conf.in
# replace occurrences of zimbra users in config files
# do not match the beginning of lines because escaping $ is easy to get wrong
sed -i "s|daemon_user *= *'zimbra';|daemon_user = '$USER_NAME';|" ZimbraServer/conf/amavisd.conf.in
sed -i "s|daemon_group *= *'zimbra';|daemon_group = '$GROUP_NAME';|" ZimbraServer/conf/amavisd.conf.in
sed -i "s|UserID *zimbra:zimbra|UserID $USER_NAME:$GROUP_NAME|" ZimbraServer/conf/opendkim.conf.in
sed -i "s|User zimbra|User $USER_NAME|" ZimbraServer/conf/clamd.conf.in
sed -i "s|Trust zimbra|Trust $USER_NAME|" ZimbraServer/conf/dspam.conf.in
sed -i "s|DatabaseOwner zimbra|DatabaseOwner $USER_NAME|" ZimbraServer/conf/freshclam.conf.in
[zimbra-build]
[zimbra-build]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment