1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_ynh.git synced 2024-09-03 18:36:10 +02:00
This commit is contained in:
ericgaspar 2021-02-15 11:58:20 +01:00
parent 62b6217a4d
commit 6dde6ea7b1
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 15 additions and 12 deletions

View file

@ -161,12 +161,7 @@ then
ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json" ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json"
fi fi
cp ../conf/credentials.json $final_path/credentials.json ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/credentials.json"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json"
ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/credentials.json"
#================================================= #=================================================
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM

View file

@ -151,13 +151,21 @@ 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="__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" 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 ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/credentials.json"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json"
ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/credentials.json"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION