mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
Merge pull request #18 from anmol26s/master
Fix for the issue https://github.com/YunoHost-Apps/peertube_ynh/issues/14
This commit is contained in:
commit
fb5c830504
2 changed files with 12 additions and 1 deletions
|
@ -132,6 +132,7 @@ ynh_app_setting_set "$app" final_path "$final_path"
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source "$final_path"
|
ynh_setup_source "$final_path"
|
||||||
cp ../conf/production.yaml "$final_path/config/production.yaml"
|
cp ../conf/production.yaml "$final_path/config/production.yaml"
|
||||||
|
touch "$final_path/config/local-production.json"
|
||||||
(cd "$final_path" && yarn install --production --pure-lockfile)
|
(cd "$final_path" && yarn install --production --pure-lockfile)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -57,6 +57,10 @@ ynh_abort_if_errors
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Create a temporary directory
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
# Backup the config file in the temp dir
|
||||||
|
cp -a "$final_path/config/local-production.json" "$tmpdir/local-production.json"
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove "$final_path"
|
ynh_secure_remove "$final_path"
|
||||||
|
|
||||||
|
@ -104,6 +108,12 @@ path_url=$(ynh_normalize_url_path "$path_url")
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source "$final_path"
|
ynh_setup_source "$final_path"
|
||||||
cp ../conf/production.yaml "$final_path/config/production.yaml"
|
cp ../conf/production.yaml "$final_path/config/production.yaml"
|
||||||
|
|
||||||
|
#Copy the admin saved settings from tmp directory to final path
|
||||||
|
cp -a "$tmpdir/local-production.json" "$final_path/config/local-production.json"
|
||||||
|
|
||||||
|
# Remove the tmp directory securely
|
||||||
|
ynh_secure_remove "$tmpdir"
|
||||||
(cd "$final_path" && yarn install --production --pure-lockfile)
|
(cd "$final_path" && yarn install --production --pure-lockfile)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue