diff --git a/manifest.json b/manifest.json index eecfcf7..a2657bf 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Wekan", "id": "wekan", "packaging_format": 1, - "version": "0.77-1", + "version": "0.77-2", "description": { "en": "Trello-like kanban", "fr": "Un kanban similaire à Trello" diff --git a/scripts/install b/scripts/install index a3a8db0..ff9bb84 100755 --- a/scripts/install +++ b/scripts/install @@ -48,7 +48,7 @@ ynh_app_setting_set $app port $port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_install_nodejs 4.8.7 +ynh_install_nodejs 8.9.3 # Install mongodb wget https://www.mongodb.org/static/pgp/server-3.2.asc -O - | apt-key add - @@ -96,12 +96,12 @@ systemctl restart mongod # SETUP SYSTEMD #================================================= # 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_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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9e1fbb0..6db2e0b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,6 +58,18 @@ fi if ynh_version_gt "0.63-1" "${version}" ; then ynh_install_nodejs 4.8.7 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 @@ -74,11 +86,18 @@ ynh_setup_source "$final_path" #================================================= # SECURE FILES AND DIRECTORIES #================================================= + # Set strong right permissions to app files chown -R $app: "$final_path" chmod -R 640 "$final_path" 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 #=================================================