mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
[enh] Add libreoffice
This commit is contained in:
parent
dccd6966f1
commit
7cc8d9dbd7
1 changed files with 16 additions and 4 deletions
|
@ -33,7 +33,7 @@ admin=$YNH_APP_ARG_ADMIN
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
abiword=$YNH_APP_ARG_ABIWORD
|
export=$YNH_APP_ARG_EXPORT
|
||||||
path_url="" # Assure la compatibilité avec les fonctions utilisant $path_url
|
path_url="" # Assure la compatibilité avec les fonctions utilisant $path_url
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
@ -67,7 +67,7 @@ ynh_app_setting_set $app admin $admin
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set $app is_public $is_public
|
||||||
ynh_app_setting_set $app password $password
|
ynh_app_setting_set $app password $password
|
||||||
ynh_app_setting_set $app language $language
|
ynh_app_setting_set $app language $language
|
||||||
ynh_app_setting_set $app abiword $abiword
|
ynh_app_setting_set $app export $export
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -82,11 +82,17 @@ ynh_app_setting_set $app port $port
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ $abiword -eq 1 ]
|
if [ $export -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_install_app_dependencies abiword
|
ynh_install_app_dependencies abiword
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $export -eq 2 ]
|
||||||
|
then
|
||||||
|
ynh_install_app_dependencies unoconv libreoffice-writer
|
||||||
|
|
||||||
|
fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL NODEJS
|
# INSTALL NODEJS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -157,11 +163,17 @@ ynh_replace_string "__DB_USER__" "$db_name" "$final_path/credentials.json"
|
||||||
ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/credentials.json"
|
ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/credentials.json"
|
||||||
ynh_replace_string "__ADMIN__" "$admin" "$final_path/credentials.json"
|
ynh_replace_string "__ADMIN__" "$admin" "$final_path/credentials.json"
|
||||||
ynh_replace_string "__PASSWD__" "$password" "$final_path/credentials.json"
|
ynh_replace_string "__PASSWD__" "$password" "$final_path/credentials.json"
|
||||||
if [ "$abiword" -eq 1 ]
|
if [ "$export" -eq 1 ]
|
||||||
then
|
then
|
||||||
abiword_path=`which abiword` # Récupère l'emplacement de l'exécutable de abiword
|
abiword_path=`which abiword` # Récupère l'emplacement de l'exécutable de abiword
|
||||||
ynh_replace_string "\"abiword\" : null" "\"abiword\" : \"$abiword_path\"" "$final_path/settings.json" # Renseigne l'emplacement de abiword dans la config de etherpad
|
ynh_replace_string "\"abiword\" : null" "\"abiword\" : \"$abiword_path\"" "$final_path/settings.json" # Renseigne l'emplacement de abiword dans la config de etherpad
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$export" -eq 2 ]
|
||||||
|
then
|
||||||
|
soffice_path=`which soffice` # Récupère l'emplacement de l'exécutable de abiword
|
||||||
|
ynh_replace_string "\"soffice\" : null" "\"soffice\" : \"$soffice_path\"" "$final_path/settings.json" # Renseigne l'emplacement de abiword dans la config de etherpad
|
||||||
|
fi
|
||||||
ynh_replace_string "__LANGUAGE__" "$language" "$final_path/settings.json"
|
ynh_replace_string "__LANGUAGE__" "$language" "$final_path/settings.json"
|
||||||
ynh_store_file_checksum "$final_path/settings.json" # Enregistre la somme de contrôle du fichier de config
|
ynh_store_file_checksum "$final_path/settings.json" # Enregistre la somme de contrôle du fichier de config
|
||||||
ynh_store_file_checksum "$final_path/credentials.json" # Enregistre la somme de contrôle du fichier de config
|
ynh_store_file_checksum "$final_path/credentials.json" # Enregistre la somme de contrôle du fichier de config
|
||||||
|
|
Loading…
Add table
Reference in a new issue