-
Notifications
You must be signed in to change notification settings - Fork 0
/
webservices.fix
executable file
·84 lines (78 loc) · 3.55 KB
/
webservices.fix
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
ROOT=/usr/share
export apache_user=apache
export apache_group=apache
which apt-get >/dev/null
if [ $? == 0 ]; then
echo "debian based system"
export apache_user=www-data
export apache_group=www-data
apt-get install apache2 mariadb-server libapache2-mod-php php-mysql php-mbstring php-ldap php-pear zend-framework mariadb-client
apt-get install php php-mysql php-mbstring php-ldap php-pear php-zip php-curl php-gd
apt-get install smarty3 php-sabre-vobject
else
which yum >//dev/null
if [ $? == 0 ]; then
echo "centos based system"
yum install apache2 mariadb-server libapache2-mod-php php-mysql php-mbstring php-ldap php-pear zend-framework mariadb-client
yum install php php-mysql php-mbstring php-ldap php-pear php-zip php-curl php-gd
yum install smarty3
fi
fi
echo
#rsync -av webservices/roundcubemail* $ROOT/
git clone https://github.com/roundcube/roundcubemail.git $ROOT/roundcubemail
$ROOT/roundcubemail/bin/install-jsdeps.sh
lessc --relative-urls -x $ROOT/roundcubemail/plugins/libkolab/skins/elastic/libkolab.less > $ROOT/roundcubemail/plugins/libkolab/skins/elastic/libkolab.min.css
#rsync -av webservices/mcConsolette $ROOT/
git clone https://github.com/mbadici/mcConsolette.git $ROOT/mcConsolette
mkdir $ROOT/mcConsolette/templates_c
chown $apache_user:$apache_group $ROOT/mcConsolette/templates_c
#rsync -av webservices/chwala* $ROOT/
git clone https://git.kolab.org/diffusion/C/chwala.git $ROOT/chwala
git clone https://git.kolab.org/diffusion/S/syncroton.git $ROOT/syncroton
git clone https://git.kolab.org/source/iRony.git $ROOT/iRony
#mkdir $ROOT/syncroton/lib/plugins
ln -s $ROOT/roundcubemail/plugins $ROOT/syncroton/lib/
mkdir $ROOT/chwala/lib/drivers/kolab/plugins
mkdir $ROOT/chwala/lib/ext
chown -R $apache_user:$apache_group $ROOT/mcConsolette
chown -R $apache_user:$apache_group $ROOT/roundcubemail
chown -R $apache_user:$apache_group $ROOT/chwala
chown -R $apache_user:$apache_group $ROOT/syncroton
ln -s $ROOT/roundcubemail/program/lib/Roundcube $ROOT/syncroton/lib/ext/
ln -s $ROOT/roundcubemail/program/lib/Roundcube $ROOT/chwala/lib/ext/
for plug in `ls $ROOT/roundcubemail/plugins|grep kolab`;
do ln -s $ROOT/roundcubemail/plugins/$plug $ROOT/syncroton/lib/plugins/
ln -s $ROOT/roundcubemail/plugins/$plug $ROOT/chwala/lib/drivers/kolab/plugins/
cp webservices/rc-config/ldap-authentication-config.inc.php $ROOT/roundcubemail/plugins/ldap-authentication/config.inc.php
done
echo "configuring iRony"
ln -s $ROOT/roundcubemail/program/lib/Roundcube $ROOT/iRony/lib/
ln -s $ROOT/roundcubemail/config/config.inc.php $ROOT/iRony/config/
ln -s $ROOT/roundcubemail/plugins $ROOT/iRony/lib/
ln -s $ROOT/chwala/lib $ROOT/iRony/lib/FileAPI
cp webservices/rc-config/iRony-config.inc.php $ROOT/iRony/config/dav.inc.php
cp webservices/httpd-machinet.conf /etc/apache2/sites-available
which apt-get >/dev/null
if [ $? == 0 ]; then
/sbin/a2ensite httpd-machinet.conf
#service apache2 restart
systemctl restart apache2
else
/etc/rc.d/rc.httpd restart
fi
echo "Enter mysql root password:"
mysql -u root -p < webservices/database.sql
mysql -u root -p roundcubemail < webservices/kolab16.sql
mkdir /etc/machinet/roundcubemail
cp webservices/roundcubemail/config/config.inc.php /etc/machinet/roundcubemail/
ln -s /etc/machinet/roundcubemail/config.inc.php $ROOT/roundcubemail/config/
cd $ROOT
#ln -s roundcubemail-* roundcubemail
ln -s chwala* chwala
mkdir /var/log/roundcubemail/
chown $apache_user:$apache_group /var/log/roundcubemail
rm -rf $ROOT/roundcubemail/logs
ln -s /var/log/roundcubemail $ROOT/roundcubemail/logs
cd $ROOT/roundcubemail/plugins