mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
Update upgrade
This commit is contained in:
parent
9a19bf2ef9
commit
b9cd3d4fde
1 changed files with 22 additions and 22 deletions
|
@ -84,22 +84,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=42
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
pushd "$final_path"
|
||||
git pull origin
|
||||
ynh_use_nodejs
|
||||
ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/run.sh
|
||||
popd
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -126,15 +110,31 @@ ynh_script_progression --message="Making sure dedicated system user exists..." -
|
|||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6
|
||||
|
||||
ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json"
|
||||
ynh_store_file_checksum --file="$final_path/settings.json"
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
|
||||
ynh_store_file_checksum --file="$final_path/credentials.json"
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
pushd "$final_path"
|
||||
git pull origin
|
||||
ynh_use_nodejs
|
||||
ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/run.sh
|
||||
popd
|
||||
fi
|
||||
|
||||
# #=================================================
|
||||
# # MODIFY A CONFIG FILE
|
||||
# #=================================================
|
||||
# ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6
|
||||
|
||||
# ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json"
|
||||
# ynh_store_file_checksum --file="$final_path/settings.json"
|
||||
|
||||
# ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
|
||||
# ynh_store_file_checksum --file="$final_path/credentials.json"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue