1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hedgedoc_ynh.git synced 2024-09-03 19:25:52 +02:00
This commit is contained in:
Éric Gaspar 2024-05-28 14:32:08 +02:00
parent ed72fec69b
commit 98694a73c9
3 changed files with 12 additions and 32 deletions

View file

@ -21,17 +21,11 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================

View file

@ -64,7 +64,7 @@ yunohost service add $app --description="Collaborative Markdown editor" --log="/
#==============================================
# INSTALL HEDGEDOC
#==============================================
ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=10
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=10
pushd "$install_dir"
ynh_use_nodejs

View file

@ -9,12 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
@ -57,14 +51,10 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=10
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=10
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$install_dir --keep="config.json"
fi
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$install_dir --keep="config.json"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -85,18 +75,14 @@ yunohost service add $app --description="Collaborative Markdown editor" --log="/
#==============================================
# INSTALL HEDGEDOC
#==============================================
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=10
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=10
pushd "$install_dir"
ynh_secure_remove /usr/local/share/.cache/yarn
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn workspaces focus --production
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean
popd
fi
pushd "$install_dir"
ynh_secure_remove /usr/local/share/.cache/yarn
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn workspaces focus --production
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean
popd
#=================================================
# MODIFY A CONFIG FILE