mirror of
https://github.com/YunoHost-Apps/nodebb_ynh.git
synced 2024-09-03 19:46:29 +02:00
Set upgrade
This commit is contained in:
parent
f11ba8bc80
commit
795dc7d0a7
3 changed files with 9 additions and 13 deletions
|
@ -10,7 +10,7 @@ Group=__APP__
|
|||
|
||||
Environment=NODE_ENV=production
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
PIDFile=__FINALPATH__/pidfile
|
||||
#PIDFile=__FINALPATH__/pidfile
|
||||
Environment="__YNH_NODE_LOAD_PATH__"
|
||||
ExecStart=__YNH_NODE__ __FINALPATH__/nodebb start
|
||||
#loader.js
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="postgresql"
|
||||
|
||||
nodejs_version=14
|
||||
|
||||
nodebb_version=v1.18.x
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -83,8 +83,14 @@ 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
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.json"
|
||||
pushd $final_path
|
||||
# Shut down your forum
|
||||
./nodebb stop
|
||||
# Grab the latest and greatest code
|
||||
git fetch # Grab the latest code from the NodeBB Repository
|
||||
git reset --hard origin/$nodebb_version # Replace v1.12.x with the branch name!
|
||||
# Run the NodeBB upgrade script
|
||||
./nodebb upgrade
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -108,14 +114,6 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
# Install Nodejs
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
#=================================================
|
||||
# UPDATE NODEBB
|
||||
#=================================================
|
||||
|
||||
pushd $final_path
|
||||
ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb upgrade
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue