mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
Full PMA&Roundcube installs + dovecot namespace hotfix
This commit is contained in:
parent
090875a173
commit
f4d3f7a85f
1 changed files with 37 additions and 16 deletions
|
@ -999,10 +999,18 @@ if [ "$mysql" = 'yes' ]; then
|
||||||
cp -f $vestacp/pma/apache.conf /etc/phpmyadmin/
|
cp -f $vestacp/pma/apache.conf /etc/phpmyadmin/
|
||||||
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
|
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
|
||||||
fi
|
fi
|
||||||
cp -f $vestacp/pma/config.inc.php /etc/phpmyadmin/
|
if [[ ${release:0:2} -ge 18 ]]; then
|
||||||
|
mysql < /usr/share/phpmyadmin/sql/create_tables.sql
|
||||||
|
p=$(grep dbpass /etc/phpmyadmin/config-db.php |cut -f 2 -d "'")
|
||||||
|
mysql -e "GRANT ALL ON phpmyadmin.*
|
||||||
|
TO phpmyadmin@localhost IDENTIFIED BY '$p'"
|
||||||
|
else
|
||||||
|
cp -f $vestacp/pma/config.inc.php /etc/phpmyadmin/
|
||||||
|
fi
|
||||||
chmod 777 /var/lib/phpmyadmin/tmp
|
chmod 777 /var/lib/phpmyadmin/tmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Configure PostgreSQL #
|
# Configure PostgreSQL #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -1147,29 +1155,42 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
|
||||||
cp -f $vestacp/roundcube/apache.conf /etc/roundcube/
|
cp -f $vestacp/roundcube/apache.conf /etc/roundcube/
|
||||||
ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
|
ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
|
||||||
fi
|
fi
|
||||||
cp -f $vestacp/roundcube/main.inc.php /etc/roundcube/
|
|
||||||
cp -f $vestacp/roundcube/db.inc.php /etc/roundcube/
|
if [[ ${release:0:2} -ge 18 ]]; then
|
||||||
chmod 640 /etc/roundcube/debian-db*
|
r=$(grep dbpass= /etc/roundcube/debian-db.php |cut -f 2 -d "'")
|
||||||
chown root:www-data /etc/roundcube/debian-db*
|
sed -i "s/default_host.*/default_host'] = 'localhost';/" \
|
||||||
cp -f $vestacp/roundcube/vesta.php \
|
/etc/roundcube/config.inc.php
|
||||||
/usr/share/roundcube/plugins/password/drivers/
|
sed -i "s/^);/'password');/" /etc/roundcube/config.inc.php
|
||||||
cp -f $vestacp/roundcube/config.inc.php /etc/roundcube/plugins/password/
|
else
|
||||||
r="$(gen_pass)"
|
r="$(gen_pass)"
|
||||||
mysql -e "CREATE DATABASE roundcube"
|
cp -f $vestacp/roundcube/main.inc.php /etc/roundcube/
|
||||||
mysql -e "GRANT ALL ON roundcube.*
|
cp -f $vestacp/roundcube/db.inc.php /etc/roundcube/
|
||||||
TO roundcube@localhost IDENTIFIED BY '$r'"
|
sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
|
||||||
sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
|
fi
|
||||||
touch /var/log/roundcube/errors
|
|
||||||
chmod 640 /var/log/roundcube/errors
|
|
||||||
chown www-data:adm /var/log/roundcube/errors
|
|
||||||
if [ "$release" = '16.04' ]; then
|
if [ "$release" = '16.04' ]; then
|
||||||
|
# TBD: should be fixed in config repo
|
||||||
mv /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
|
mv /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
|
||||||
mv /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php
|
mv /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php
|
||||||
chmod 640 /etc/roundcube/debian-db-roundcube.php
|
chmod 640 /etc/roundcube/debian-db-roundcube.php
|
||||||
chown root:www-data /etc/roundcube/debian-db-roundcube.php
|
chown root:www-data /etc/roundcube/debian-db-roundcube.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cp -f $vestacp/roundcube/vesta.php \
|
||||||
|
/usr/share/roundcube/plugins/password/drivers/
|
||||||
|
cp -f $vestacp/roundcube/config.inc.php /etc/roundcube/plugins/password/
|
||||||
|
|
||||||
|
mysql -e "CREATE DATABASE roundcube"
|
||||||
|
mysql -e "GRANT ALL ON roundcube.*
|
||||||
|
TO roundcube@localhost IDENTIFIED BY '$r'"
|
||||||
mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
|
mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
|
||||||
|
|
||||||
|
chmod 640 /etc/roundcube/debian-db*
|
||||||
|
chown root:www-data /etc/roundcube/debian-db*
|
||||||
|
touch /var/log/roundcube/errors
|
||||||
|
chmod 640 /var/log/roundcube/errors
|
||||||
|
chown www-data:adm /var/log/roundcube/errors
|
||||||
|
|
||||||
php5enmod mcrypt 2>/dev/null
|
php5enmod mcrypt 2>/dev/null
|
||||||
phpenmod mcrypt 2>/dev/null
|
phpenmod mcrypt 2>/dev/null
|
||||||
if [ "$apache" = 'yes' ]; then
|
if [ "$apache" = 'yes' ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue