-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathuser-alias-installer.sh
More file actions
executable file
·61 lines (46 loc) · 2.04 KB
/
user-alias-installer.sh
File metadata and controls
executable file
·61 lines (46 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
#!/bin/bash
# Copyright (C) 2017-2018 Barry de Graaff
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
set -e
# if you want to trace your script uncomment the following line
# set -x
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
TMPFOLDER="$(mktemp -d /tmp/user-alias-installer.XXXXXXXX)"
cd $TMPFOLDER
git clone --depth=1 https://github.com/Zimbra-Community/user-alias
cd user-alias
rm -Rf /opt/zimbra/lib/ext/userAlias
mkdir -p /opt/zimbra/lib/ext/userAlias
cp extension/out/artifacts/userAlias_jar/userAlias.jar /opt/zimbra/lib/ext/userAlias/
cp config.properties /opt/zimbra/lib/ext/userAlias/
rm -Rf $TMPFOLDER
echo "--------------------------------------------------------------------------------------------------------------
User Alias Extension installed successful
To activate your configuration, run as zimbra user:
su - zimbra -c \"zmmailboxdctl restart\"
You must set-up your permissions in /opt/zimbra/lib/ext/userAlias/config.properties or this extension won't do much.
Please deploy the Zimlet yourself:
cd /tmp
wget --no-cache https://github.com/Zimbra-Community/user-alias/releases/download/0.0.2/tk_barrydegraaff_useralias.zip -O /tmp/tk_barrydegraaff_useralias.zip
su zimbra
cd /tmp
zmzimletctl deploy tk_barrydegraaff_useralias.zip
--------------------------------------------------------------------------------------------------------------
"