mirror of
https://github.com/YunoHost-Apps/hedgedoc_ynh.git
synced 2024-09-03 19:25:52 +02:00
cleaning
This commit is contained in:
parent
ed72fec69b
commit
98694a73c9
3 changed files with 12 additions and 32 deletions
|
@ -21,17 +21,11 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
ynh_backup --src_path="$install_dir"
|
ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
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"
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -64,7 +64,7 @@ yunohost service add $app --description="Collaborative Markdown editor" --log="/
|
||||||
#==============================================
|
#==============================================
|
||||||
# INSTALL HEDGEDOC
|
# 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"
|
pushd "$install_dir"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
|
|
|
@ -9,12 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -57,14 +51,10 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=10
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
then
|
ynh_setup_source --dest_dir=$install_dir --keep="config.json"
|
||||||
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
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
@ -85,18 +75,14 @@ yunohost service add $app --description="Collaborative Markdown editor" --log="/
|
||||||
#==============================================
|
#==============================================
|
||||||
# INSTALL HEDGEDOC
|
# INSTALL HEDGEDOC
|
||||||
#==============================================
|
#==============================================
|
||||||
|
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=10
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
pushd "$install_dir"
|
||||||
then
|
ynh_secure_remove /usr/local/share/.cache/yarn
|
||||||
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=10
|
ynh_use_nodejs
|
||||||
|
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn workspaces focus --production
|
||||||
pushd "$install_dir"
|
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean
|
||||||
ynh_secure_remove /usr/local/share/.cache/yarn
|
popd
|
||||||
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
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
|
|
Loading…
Add table
Reference in a new issue