1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wekan_ynh.git synced 2024-09-03 20:36:09 +02:00

Upgrading nodejs version to 8.9.3 to match wekan version

This commit is contained in:
Alexandre Aubin 2018-02-25 02:09:31 +01:00
parent eeea893297
commit 4c90e01f37
3 changed files with 27 additions and 8 deletions

View file

@ -2,7 +2,7 @@
"name": "Wekan", "name": "Wekan",
"id": "wekan", "id": "wekan",
"packaging_format": 1, "packaging_format": 1,
"version": "0.77-1", "version": "0.77-2",
"description": { "description": {
"en": "Trello-like kanban", "en": "Trello-like kanban",
"fr": "Un kanban similaire à Trello" "fr": "Un kanban similaire à Trello"

View file

@ -48,7 +48,7 @@ ynh_app_setting_set $app port $port
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_install_nodejs 4.8.7 ynh_install_nodejs 8.9.3
# Install mongodb # Install mongodb
wget https://www.mongodb.org/static/pgp/server-3.2.asc -O - | apt-key add - wget https://www.mongodb.org/static/pgp/server-3.2.asc -O - | apt-key add -

View file

@ -58,6 +58,18 @@ fi
if ynh_version_gt "0.63-1" "${version}" ; then if ynh_version_gt "0.63-1" "${version}" ; then
ynh_install_nodejs 4.8.7 ynh_install_nodejs 4.8.7
fi fi
if ynh_version_gt "0.77-2" "${version}" ; then
ynh_install_nodejs 8.9.3
# Create a dedicated systemd config
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
ynh_replace_string "__DB_NAME__" "$app" "../conf/systemd.service"
ynh_replace_string "__URI__" "$path_url/" "../conf/systemd.service"
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service"
ynh_add_systemd_config
fi
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
@ -74,11 +86,18 @@ ynh_setup_source "$final_path"
#================================================= #=================================================
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
# Set strong right permissions to app files # Set strong right permissions to app files
chown -R $app: "$final_path" chown -R $app: "$final_path"
chmod -R 640 "$final_path" chmod -R 640 "$final_path"
find "$final_path" -type d -print0 | xargs -0 chmod 750 find "$final_path" -type d -print0 | xargs -0 chmod 750
# Relaunch a npm install
pushd $final_path/programs/server
ynh_use_nodejs
npm install
popd
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================