mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
Add config
This commit is contained in:
parent
f3e6aef9c5
commit
5c5222841a
3 changed files with 30 additions and 1 deletions
|
@ -53,6 +53,16 @@
|
|||
},
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "export",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Use AbiWord (~260 Mo) or LibreOffice (~400 Mo) (more stable) to expand export possibilities (PDF, doc)?",
|
||||
"fr": "Utiliser AbiWord (~260 Mo) ou LibreOffice (~400 Mo) (plus stable) pour étendre les possibilités d'export (PDF, doc) ?"
|
||||
},
|
||||
"choices" : ["none", "abiword", "libreoffice"],
|
||||
"default" : "none"
|
||||
},
|
||||
{
|
||||
"name": "language",
|
||||
"type": "string",
|
||||
|
|
|
@ -9,6 +9,12 @@ pkg_dependencies="postgresql postgresql-contrib apt-transport-https"
|
|||
|
||||
nodejs_version=12
|
||||
|
||||
# Dependencies for AbiWord
|
||||
abiword_app_depencencies="abiword"
|
||||
|
||||
# Dependencies for LibreOffice
|
||||
libreoffice_app_dependencies="unoconv libreoffice-writer"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -128,7 +128,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
|
|||
#=================================================
|
||||
# INSTALL ETHERPAD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing Etherpad..." --weight=90
|
||||
ynh_script_progression --message="Installing Etherpad..." --weight=60
|
||||
|
||||
chown -R $app: $final_path
|
||||
|
||||
|
@ -147,6 +147,19 @@ cp ../conf/settings.json $final_path/settings.json
|
|||
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json"
|
||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json"
|
||||
if [ "$export" = "abiword" ]
|
||||
then
|
||||
# Get AbiWord binary path
|
||||
abiword_path=`which abiword`
|
||||
# Set the path of abiword into Etherpad config
|
||||
ynh_replace_string --match_string="\"abiword\" : null" --replace_string="\"abiword\" : \"$abiword_path\"" --target_file="$final_path/settings.json"
|
||||
elif [ "$export" = "libreoffice" ]
|
||||
then
|
||||
# Get soffice binary path
|
||||
soffice_path=`which soffice`
|
||||
# Set the path of soffice into Etherpad config
|
||||
ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json"
|
||||
fi
|
||||
|
||||
cp ../conf/credentials.json $final_path/credentials.json
|
||||
|
||||
|
|
Loading…
Reference in a new issue