1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/strut_ynh.git synced 2024-09-03 20:26:33 +02:00
This commit is contained in:
Éric Gaspar 2023-10-28 18:59:29 +02:00
parent 13c0aad12a
commit b63ac5b12d
2 changed files with 3 additions and 19 deletions

View file

@ -2,7 +2,7 @@
location __PATH__/ { location __PATH__/ {
# Path to source # Path to source
alias __INSTALL_DIR__/ ; alias __INSTALL_DIR__/dist/ ;
index index.html; index index.html;
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;

View file

@ -16,14 +16,9 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=4 ynh_script_progression --message="Setting up source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir"
# For this app sources are in app subdirectory
tmp_dir=$(mktemp -d)
ynh_setup_source --dest_dir="$tmp_dir" chown -R $app:www-data "$install_dir"
mv "$tmp_dir/dist" "$install_dir"
ynh_secure_remove --file="$tmp_dir"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -43,17 +38,6 @@ ynh_add_nginx_config
# Don't use a patch because it's minified js # 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" 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 # END OF SCRIPT
#================================================= #=================================================