diff --git a/scripts/install b/scripts/install index 0cbbf63..b567f40 100755 --- a/scripts/install +++ b/scripts/install @@ -53,7 +53,6 @@ ynh_script_progression --message="Finding an available port..." --weight=1 # Find a free port port=$(ynh_find_port --port=1880) -# Open this port ynh_app_setting_set --app=$app --key=port --value=$port #================================================= @@ -87,8 +86,8 @@ ynh_script_progression --message="Installing Node-RED..." --weight=2 chown -R $app: $final_path pushd $final_path -ynh_use_nodejs -exec_as $app env PATH=$PATH npm install --production + ynh_use_nodejs + exec_as $app env PATH=$PATH npm install --production popd #================================================= diff --git a/scripts/remove b/scripts/remove index 2cc5e22..1cd634c 100755 --- a/scripts/remove +++ b/scripts/remove @@ -81,11 +81,6 @@ fi # REMOVE THE LOG FILE #================================================= -# Remove from npm -# If multiple instances, it will break the others -# Need a way to count -#npm uninstall node-red -g - # Remove the log files ynh_secure_remove --file="/var/log/$app/" diff --git a/scripts/upgrade b/scripts/upgrade index 177ca06..1a87d55 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,8 +105,8 @@ ynh_script_progression --message="Installing Node-RED..." --weight=30 chown -R $app: $final_path pushd $final_path -ynh_use_nodejs -exec_as $app env PATH=$PATH npm install --production + ynh_use_nodejs + exec_as $app env PATH=$PATH npm install --production popd #================================================= @@ -121,7 +121,7 @@ ynh_add_nginx_config # SPECIFIC UPGRADE #================================================= if [ ! -f $final_path/data/settings.js ]; then - cp $final_path/settings.js $final_path/data/settings.js + cp $final_path/settings.js $final_path/data/settings.js fi ynh_replace_string --match_string="//httpRoot: '/red'," --replace_string="httpRoot: '$path_url'," --target_file="$final_path/data/settings.js" ynh_replace_string --match_string="//ui: { path: "ui" }," --replace_string="ui: { path: "/ui/" }," --target_file="$final_path/data/settings.js"