1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/penpot_ynh.git synced 2024-09-03 19:56:56 +02:00

Fixed upgrade?

This commit is contained in:
orhtej2 2024-02-11 14:33:36 +01:00
parent e206fe59bd
commit ca0c6858fc

View file

@ -18,10 +18,9 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app-backend --action="stop" ynh_systemd_action --service_name=$app-backend --action="stop"
ynh_systemd_action --service_name=$app-backend --action="stop" ynh_systemd_action --service_name=$app-exporter --action="stop"
#================================================= #=================================================
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
@ -58,7 +57,7 @@ then
ynh_script_progression --message="Upgrading source files..." ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir/build"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod -R 755 "$install_dir" chmod -R 755 "$install_dir"
@ -78,6 +77,7 @@ then
echo "$version" > target/version.txt; echo "$version" > target/version.txt;
popd popd
ynh_secure_remove --file=$install_dir/frontend
mkdir -p $install_dir/frontend mkdir -p $install_dir/frontend
mv $install_dir/build/frontend/target/dist/* $install_dir/frontend mv $install_dir/build/frontend/target/dist/* $install_dir/frontend
chown -R $app:www-data $install_dir/frontend chown -R $app:www-data $install_dir/frontend
@ -103,6 +103,7 @@ then
cp -r builtin-templates target/dist/ cp -r builtin-templates target/dist/
popd popd
ynh_secure_remove --file=$install_dir/backend
mkdir -p $install_dir/backend mkdir -p $install_dir/backend
mv $install_dir/build/backend/target/dist/* $install_dir/backend mv $install_dir/build/backend/target/dist/* $install_dir/backend
chown -R $app:$app $install_dir/backend chown -R $app:$app $install_dir/backend
@ -118,6 +119,7 @@ then
sed -i -re "s/\%version\%/$version/g" ./target/app.js sed -i -re "s/\%version\%/$version/g" ./target/app.js
popd popd
ynh_secure_remove --file=$install_dir/exporter
mkdir -p $install_dir/exporter mkdir -p $install_dir/exporter
mv $install_dir/build/exporter/target/* $install_dir/exporter mv $install_dir/build/exporter/target/* $install_dir/exporter
chown -R $app:$app $install_dir/exporter chown -R $app:$app $install_dir/exporter