1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/codimd_ynh.git synced 2024-09-03 18:16:32 +02:00
This commit is contained in:
ericgaspar 2021-05-08 14:38:50 +02:00
parent 34a5656d27
commit 173c3356a5
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 9 additions and 15 deletions

View file

@ -117,13 +117,12 @@ path_url=${path_url:1}
cp ../conf/config.json.example "$final_path/config.json"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
ynh_store_file_checksum --file="$final_path/config.json"

View file

@ -115,12 +115,10 @@ ynh_add_nginx_config
#==============================================
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=24
chown -R $app: $final_path
pushd "$final_path" || ynh_die
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app bin/setup
ynh_exec_warn_less ynh_exec_as $app yarn run build
ynh_exec_warn_less bin/setup
ynh_exec_warn_less yarn run build
popd || ynh_die
#=================================================

View file

@ -74,7 +74,6 @@ ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files
chown -R $app:$app $final_path
chmod o-rwx $final_path
#=================================================
# SPECIFIC RESTORATION

View file

@ -133,12 +133,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=16
chown -R $app: $final_path
pushd "$final_path" || ynh_die
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app bin/setup
ynh_exec_warn_less ynh_exec_as $app yarn run build
ynh_exec_warn_less bin/setup
ynh_exec_warn_less yarn run build
popd || ynh_die
fi