1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nodered_ynh.git synced 2024-09-03 19:46:25 +02:00

Comments cleanup and code formatting

This commit is contained in:
tituspijean 2020-11-07 19:37:30 +01:00
parent 531ecea6e9
commit 2e4e2a86fd
3 changed files with 5 additions and 11 deletions

View file

@ -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
#=================================================

View file

@ -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/"

View file

@ -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"