1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tooljet_ynh.git synced 2024-10-01 13:34:55 +02:00

Cleanup to save disk space

This commit is contained in:
tituspijean 2023-09-16 14:01:45 +02:00
parent 2cf0525c95
commit 7851502ad0
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 12 additions and 0 deletions

View file

@ -55,6 +55,12 @@ pushd $install_dir
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build
popd popd
# Cleanup after install
ynh_secure_remove --file="$install_dir/.cache"
ynh_secure_remove --file="$install_dir/.npm/_cacache"
ynh_secure_remove --file="$install_dir/node_modules"
ynh_secure_remove --file="$install_dir/frontend/node_modules"
chmod 750 "$install_dir" chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir" chown -R $app:$app "$install_dir"

View file

@ -43,6 +43,12 @@ chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir" chown -R $app:$app "$install_dir"
# Cleanup after install
ynh_secure_remove --file="$install_dir/.cache"
ynh_secure_remove --file="$install_dir/.npm/_cacache"
ynh_secure_remove --file="$install_dir/node_modules"
ynh_secure_remove --file="$install_dir/frontend/node_modules"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================