]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/paks/cyrusimap/install.sh
HinzugefĆ¼gt:
[people/pmueller/ipfire-2.x.git] / src / paks / cyrusimap / install.sh
CommitLineData
93dc5548
MT
1#!/bin/bash
2#
3#################################################################
4# #
5# This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #
6# #
7#################################################################
8#
f28d0ddc
MT
9CONFIGDIR=/var/ipfire/cyrusimap
10#
93dc5548
MT
11# Extract the files
12tar xfz files.tgz -C /
13cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2
f28d0ddc
MT
14
15
16
17if [ ! -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
27fi