mirror of
https://github.com/YunoHost-Apps/n8n_ynh.git
synced 2024-09-03 19:55:52 +02:00
Update upgrade
This commit is contained in:
parent
29c1b8d914
commit
965fa94fc2
1 changed files with 11 additions and 18 deletions
|
@ -46,24 +46,6 @@ if [ -z "$email" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=email --value=$email
|
ynh_app_setting_set --app=$app --key=email --value=$email
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# 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 $install_dir
|
|
||||||
ynh_use_nodejs
|
|
||||||
ynh_exec_warn_less env $ynh_node_load_PATH npm install n8n@${n8n_version}
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
|
||||||
chown -R $app:www-data "$install_dir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -90,6 +72,17 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
||||||
chmod 400 "$install_dir/.env"
|
chmod 400 "$install_dir/.env"
|
||||||
chown $app:$app "$install_dir/.env"
|
chown $app:$app "$install_dir/.env"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL n8n
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing $app..." --weight=2
|
||||||
|
|
||||||
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
|
pushd $install_dir
|
||||||
|
ynh_use_nodejs
|
||||||
|
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm update n8n@${n8n_version}
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue