mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
Add enigma by default
This commit is contained in:
parent
cabc11fc91
commit
74f6c3c44a
4 changed files with 10 additions and 48 deletions
|
@ -4,7 +4,6 @@
|
|||
path="/path"
|
||||
language="en_GB"
|
||||
with_carddav=1
|
||||
with_enigma=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -61,15 +61,6 @@
|
|||
"fr": "Installer le plugin de synchronisation CardDAV ?"
|
||||
},
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "with_enigma",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Install Enigma messages encryption plugin?",
|
||||
"fr": "Installer le plugin de chiffrement des messages Enigma ?"
|
||||
},
|
||||
"default": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ ynh_abort_if_errors
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
with_carddav=$YNH_APP_ARG_WITH_CARDDAV
|
||||
with_enigma=$YNH_APP_ARG_WITH_ENIGMA
|
||||
language=$YNH_APP_ARG_LANGUAGE
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
@ -47,7 +46,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
|
|||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
||||
ynh_app_setting_set --app=$app --key=with_enigma --value=$with_enigma
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
|
||||
#=================================================
|
||||
|
@ -153,7 +151,11 @@ ynh_composer_exec --commands="require \
|
|||
johndoh/contextmenu $contextmenu_version \
|
||||
sblaisot/automatic_addressbook $automatic_addressbook_version"
|
||||
|
||||
installed_plugins=" 'contextmenu', 'automatic_addressbook',"
|
||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook', 'enigma',"
|
||||
|
||||
ynh_add_config --template="../conf/enigma.config.inc.php" --destination="$final_path/plugins/enigma/config.inc.php"
|
||||
mkdir -p "$final_path/plugins/enigma/home"
|
||||
chown -R $app:$app "$final_path/plugins/enigma/home"
|
||||
|
||||
# Install CardDAV plugin
|
||||
if [ $with_carddav -eq 1 ]
|
||||
|
@ -191,16 +193,6 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Install Enigma plugin
|
||||
if [ $with_enigma -eq 1 ]
|
||||
then
|
||||
ynh_add_config --template="../conf/enigma.config.inc.php" --destination="$final_path/plugins/enigma/config.inc.php"
|
||||
installed_plugins+=" 'enigma'," || ynh_print_warn --message="Unable to install Enigma plugin"
|
||||
|
||||
mkdir -p "$final_path/plugins/enigma/home"
|
||||
chown -R $app:$app "$final_path/plugins/enigma/home"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# UPDATE ROUNDCUBE CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -22,7 +22,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
with_carddav=$(ynh_app_setting_get --app=$app --key=with_carddav)
|
||||
with_enigma=$(ynh_app_setting_get --app=$app --key=with_enigma)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
|
@ -75,17 +74,6 @@ if [ -z "$with_carddav" ]; then
|
|||
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
||||
fi
|
||||
|
||||
# If with_enigma doesn't exist, create it
|
||||
if [ -z "$with_enigma" ]; then
|
||||
if [ -f "${final_path}/plugins/enigma/config.inc.php" ]
|
||||
then
|
||||
with_enigma=1
|
||||
else
|
||||
with_enigma=0
|
||||
fi
|
||||
ynh_app_setting_set --app=$app --key=with_enigma --value=$with_enigma
|
||||
fi
|
||||
|
||||
# If language doesn't exist, create it
|
||||
if [ -z "$language" ]; then
|
||||
language="en_GB"
|
||||
|
@ -201,7 +189,11 @@ then
|
|||
johndoh/contextmenu $contextmenu_version \
|
||||
sblaisot/automatic_addressbook $automatic_addressbook_version"
|
||||
|
||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook', 'enigma',"
|
||||
|
||||
ynh_add_config --template="../conf/enigma.config.inc.php" --destination="$final_path/plugins/enigma/config.inc.php"
|
||||
mkdir -p "$final_path/plugins/enigma/home"
|
||||
chown -R $app:$app "$final_path/plugins/enigma/home"
|
||||
|
||||
# Update or install CardDAV plugin
|
||||
if [ $with_carddav -eq 1 ]
|
||||
|
@ -239,18 +231,6 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Install Enigma plugin
|
||||
if [ $with_enigma -eq 1 ]
|
||||
then
|
||||
enigma_tmp_config="../conf/enigma.config.inc.php"
|
||||
|
||||
ynh_replace_string --match_string="__DIR__" --replace_string="$final_path/plugins/enigma/home" --target_file="$enigma_tmp_config"
|
||||
|
||||
cp "$enigma_tmp_config" "$final_path/plugins/enigma/config.inc.php" \
|
||||
&& installed_plugins+=" 'enigma'," \
|
||||
|| ynh_print_warn --message="Unable to install Enigma plugin"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# UPDATE ROUNDCUBE CONFIGURATION
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue