1
0
Fork 0
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:
anmol26s 2018-04-13 21:43:59 +05:30 committed by GitHub
commit fb5c830504
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -132,6 +132,7 @@ ynh_app_setting_set "$app" final_path "$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path"
cp ../conf/production.yaml "$final_path/config/production.yaml"
touch "$final_path/config/local-production.json"
(cd "$final_path" && yarn install --production --pure-lockfile)
#=================================================

View file

@ -56,7 +56,11 @@ ynh_abort_if_errors
#=================================================
# 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
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
ynh_setup_source "$final_path"
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)