mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
[enh] Add installed plugins dynamically to Roundcube config
This commit is contained in:
parent
8f41144918
commit
ad0ba39c26
4 changed files with 25 additions and 17 deletions
|
@ -10,7 +10,6 @@ report issues and/or improvements!**
|
|||
|
||||
## TODO
|
||||
|
||||
* Add enabled plugins dynamically to the config file
|
||||
* Ask for rcmcarddav installation and/or check if *Baikal* or *ownCloud*
|
||||
is installed
|
||||
* Test to upgrade from the current Roundcube version
|
||||
|
|
|
@ -80,22 +80,6 @@ $config['product_name'] = 'YunoHost Webmail';
|
|||
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
|
||||
$config['des_key'] = '#DESKEY#';
|
||||
|
||||
// List of active plugins (in plugins/ directory)
|
||||
$config['plugins'] = array(
|
||||
'archive',
|
||||
'zipdownload',
|
||||
// additionnal plugins for YunoHost
|
||||
'http_authentication',
|
||||
'managesieve',
|
||||
'markasjunk',
|
||||
'new_user_dialog',
|
||||
'new_user_identity',
|
||||
'contextmenu',
|
||||
'automatic_addressbook',
|
||||
'ldapAliasSync',
|
||||
// 'carddav',
|
||||
);
|
||||
|
||||
// skin name: folder from skins/
|
||||
$config['skin'] = 'larry';
|
||||
|
||||
|
@ -118,6 +102,19 @@ $config['ldap_public']['yunohost'] = array(
|
|||
),
|
||||
);
|
||||
|
||||
// List of active plugins (in plugins/ directory)
|
||||
$config['plugins'] = array(
|
||||
'archive',
|
||||
'zipdownload',
|
||||
// additionnal plugins
|
||||
'http_authentication',
|
||||
'managesieve',
|
||||
'markasjunk',
|
||||
'new_user_dialog',
|
||||
'new_user_identity',
|
||||
// installed plugins
|
||||
);
|
||||
|
||||
// ----------------------------------
|
||||
// PLUGINS
|
||||
// ----------------------------------
|
||||
|
|
|
@ -58,10 +58,16 @@ sudo chown -R www-data: "$DESTDIR"
|
|||
# Install some plugins manually
|
||||
sudo cp -r ../sources/plugins/ldapAliasSync "${DESTDIR}/plugins"
|
||||
sudo chown -R www-data: "${DESTDIR}/plugins/ldapAliasSync"
|
||||
installed_plugins=" 'ldapAliasSync',"
|
||||
|
||||
# Install additional plugins
|
||||
exec_composer www-data "$DESTDIR" require "johndoh/contextmenu dev-release-2.1"
|
||||
exec_composer www-data "$DESTDIR" require "sblaisot/automatic_addressbook"
|
||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||
|
||||
# Update Roundcube configuration
|
||||
sudo sed -i "s#^\s*// installed plugins#&\n ${installed_plugins}#" \
|
||||
"${DESTDIR}/config/config.inc.php"
|
||||
|
||||
## Install rcmcarddav TODO: if baikal is detected
|
||||
#sudo yunohost app list -f baikal --json | grep '"installed": true'
|
||||
|
|
|
@ -70,10 +70,16 @@ fi
|
|||
sudo rm -rf "${DESTDIR}/plugins/ldapAliasSync"
|
||||
sudo cp -r ../sources/plugins/ldapAliasSync "${DESTDIR}/plugins"
|
||||
sudo chown -R www-data: "${DESTDIR}/plugins/ldapAliasSync"
|
||||
installed_plugins=" 'ldapAliasSync',"
|
||||
|
||||
# Update or install additional plugins
|
||||
exec_composer www-data "$DESTDIR" require "johndoh/contextmenu dev-release-2.1"
|
||||
exec_composer www-data "$DESTDIR" require "sblaisot/automatic_addressbook"
|
||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||
|
||||
# Update Roundcube configuration
|
||||
sudo sed -i "s#^\s*// installed plugins#&\n ${installed_plugins}#" \
|
||||
"$rc_conf"
|
||||
|
||||
## Install rcmcarddav if baikal is detected
|
||||
#sudo yunohost app list -f baikal --json | grep '"installed": true'
|
||||
|
|
Loading…
Add table
Reference in a new issue