diff --git a/scripts/install b/scripts/install index 11a984d..2f37431 100755 --- a/scripts/install +++ b/scripts/install @@ -55,6 +55,12 @@ pushd $install_dir ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build 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 -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index f84c432..186b1ad 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,6 +43,12 @@ chmod 750 "$install_dir" chmod -R o-rwx "$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 #=================================================