Browse Source

Added Roundcube installation

old-stable
gau1991 11 years ago
parent
commit
7270097fc7
  1. 32
      src/vendor/ee_ven_install_roundcube.sh
  2. 4
      src/vendor/ee_ven_install_vimbadmin.sh
  3. 4
      src/vendor/ee_ven_setup_vimbadmin.sh

32
src/vendor/ee_ven_install_roundcube.sh

@ -0,0 +1,32 @@
# Install Roundcube
function ee_mod_install_roundcube()
{
# Install Roundcube dependencies
ee_lib_echo "Installing Roundcube dependencies, please wait..."
$EE_APT_GET install php-pear \
|| ee_lib_error "Unable to install php-pear, exit status = " $?
pear install Mail_Mime Net_SMTP Mail_mimeDecode Net_IDNA2 Auth_SASL Net_Sieve Crypt_GPG \
|| ee_lib_error "Unable to install pear packages, exit status = " $?
# Setup Roundcube directory
mkdir -p /var/www/roundcubemail/htdocs && mkdir -p /var/www/roundcubemail/logs
ee_lib_symbolic_link /var/log/nginx/roundcubemail.access.log /var/www/roundcubemail/logs/access.log
ee_lib_symbolic_link /var/log/nginx/roundcubemail.error.log /var/www/roundcubemail/logs/error.log
# Install Roundcube
ee_lib_echo "Downloading Roundcube, please wait..."
wget -cqO /var/www/roundcube.tar.gz https://github.com/roundcube/roundcubemail/releases/download/1.0.2/roundcubemail-1.0.2.tar.gz \
|| ee_lib_error "Unable to download Roundcube, exit status = " $?
ee_lib_echo "Installing Roundcube, please wait..."
tar -zxf /var/www/roundcube.tar.gz
mv /var/www/roundcubemail-1.0.1/* /var/www/roundcubemail/htdocs/
# Fix permissions
chown -R $EE_PHP_USER:$EE_PHP_USER /var/www/roundcubemail \
|| ee_lib_error "Unable to change ownership for ViMbAdmin, exit status = " $?
# Remove unwanted files
rm -rf /var/www/roundcube.tar.gz /var/www/roundcubemail-1.0.1
}

4
src/vendor/ee_ven_install_vimbadmin.sh

@ -18,6 +18,10 @@ function ee_mod_install_vimbadmin()
php composer.phar install --prefer-dist --no-dev \
|| ee_lib_error "Unable to install ViMbAdmin, exit status = " $?
# Fix permissions
chown -R $EE_PHP_USER:$EE_PHP_USER /var/www/22222/htdocs/vimbadmin \
|| ee_lib_error "Unable to change ownership for ViMbAdmin, exit status = " $?
# Remove unwanted files
rm -rf /var/www/22222/htdocs/vimbadmin.tar.gz /var/www/22222/htdocs/vimbadmin/composer.phar
}

4
src/vendor/ee_ven_setup_vimbadmin.sh

@ -2,6 +2,8 @@
function ee_mod_setup_vimbadmin()
{
ee_lib_echo "configuring ViMbAdmin, please wait..."
# Random characters
local ee_random=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15 | head -n1)
@ -15,7 +17,7 @@ function ee_mod_setup_vimbadmin()
mysql -e "flush privileges"
# Setup configuration for ViMbAdmin
cp -v /var/www/22222/htdocs/vimbadmin/application/configs/application.ini.dist /var/www/22222/htdocs/vimbadmin/application/configs/application.ini
cp -av /var/www/22222/htdocs/vimbadmin/application/configs/application.ini.dist /var/www/22222/htdocs/vimbadmin/application/configs/application.ini
sed -i "s/defaults.mailbox.uid = 2000/defaults.mailbox.uid = 5000/" /var/www/22222/htdocs/vimbadmin/application/configs/application.ini
sed -i "s/defaults.mailbox.gid = 2000/defaults.mailbox.gid = 5000/" /var/www/22222/htdocs/vimbadmin/application/configs/application.ini

Loading…
Cancel
Save