diff --git a/conf/nginx.conf b/conf/nginx.conf index d30b198..378e10f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/ ; + alias __INSTALL_DIR__/dist/ ; index index.html; try_files $uri $uri/ /index.html; diff --git a/scripts/install b/scripts/install index 9542533..7414ba7 100644 --- a/scripts/install +++ b/scripts/install @@ -16,14 +16,9 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Setting up source files..." --weight=4 -# Download, check integrity, uncompress and patch the source from app.src -# For this app sources are in app subdirectory -tmp_dir=$(mktemp -d) +ynh_setup_source --dest_dir="$install_dir" -ynh_setup_source --dest_dir="$tmp_dir" -mv "$tmp_dir/dist" "$install_dir" - -ynh_secure_remove --file="$tmp_dir" +chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION @@ -43,17 +38,6 @@ ynh_add_nginx_config # Don't use a patch because it's minified js ynh_replace_string --match_string="are currently uploaded to imgur.*re working on changing this" --replace_string="size is limited" --target_file="$install_dir/scripts/amd-app.js" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chown -R $app:www-data "$install_dir" -chmod -R 640 "$install_dir" -find "$install_dir" -type d -print0 | xargs -0 chmod 750 - #================================================= # END OF SCRIPT #=================================================