mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
fix
This commit is contained in:
parent
34a5656d27
commit
173c3356a5
4 changed files with 9 additions and 15 deletions
|
@ -117,13 +117,12 @@ path_url=${path_url:1}
|
||||||
|
|
||||||
cp ../conf/config.json.example "$final_path/config.json"
|
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="__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="__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="__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_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="__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="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
|
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$final_path/config.json"
|
ynh_store_file_checksum --file="$final_path/config.json"
|
||||||
|
|
||||||
|
|
|
@ -115,12 +115,10 @@ ynh_add_nginx_config
|
||||||
#==============================================
|
#==============================================
|
||||||
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=24
|
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
|
pushd "$final_path" || ynh_die
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less ynh_exec_as $app bin/setup
|
ynh_exec_warn_less bin/setup
|
||||||
ynh_exec_warn_less ynh_exec_as $app yarn run build
|
ynh_exec_warn_less yarn run build
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -74,7 +74,6 @@ ynh_script_progression --message="Restoring user rights..."
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R $app:$app $final_path
|
chown -R $app:$app $final_path
|
||||||
chmod o-rwx $final_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
|
|
@ -133,12 +133,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=16
|
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
|
pushd "$final_path" || ynh_die
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less ynh_exec_as $app bin/setup
|
ynh_exec_warn_less bin/setup
|
||||||
ynh_exec_warn_less ynh_exec_as $app yarn run build
|
ynh_exec_warn_less yarn run build
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue