]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/paks/cyrusimap/install.sh
HinzugefĆ¼gt:
[people/pmueller/ipfire-2.x.git] / src / paks / cyrusimap / install.sh
1 #!/bin/bash
2 #
3 #################################################################
4 # #
5 # This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #
6 # #
7 #################################################################
8 #
9 CONFIGDIR=/var/ipfire/cyrusimap
10 #
11 # Extract the files
12 tar xfz files.tgz -C /
13 cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2
14
15
16
17 if [ ! -f $CONFIGDIR/server.pm ]; then
18 cd /tmp && openssl req -new -nodes -out req.pem -keyout key.pem
19 cd /tmp && openssl rsa -in key.pem -out new.key.pem
20 cd /tmp && openssl x509 -in req.pem -out ca-cert -req -signkey new.key.pem -days 999
21
22 cd /tmp && cp new.key.pem $CONFIGDIR/server.pem
23 cd /tmp && rm new.key.pem
24 cd /tmp && cat ca-cert >> $CONFIGDIR/server.pem
25 chown cyrus:mail $CONFIGDIR/server.pem
26 chmod 600 $CONFIGDIR/server.pem # Your key should be protected
27 fi