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:
parent
531ecea6e9
commit
2e4e2a86fd
3 changed files with 5 additions and 11 deletions
|
@ -53,7 +53,6 @@ ynh_script_progression --message="Finding an available port..." --weight=1
|
||||||
|
|
||||||
# Find a free port
|
# Find a free port
|
||||||
port=$(ynh_find_port --port=1880)
|
port=$(ynh_find_port --port=1880)
|
||||||
# Open this port
|
|
||||||
ynh_app_setting_set --app=$app --key=port --value=$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
|
chown -R $app: $final_path
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
exec_as $app env PATH=$PATH npm install --production
|
exec_as $app env PATH=$PATH npm install --production
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -81,11 +81,6 @@ fi
|
||||||
# REMOVE THE LOG FILE
|
# 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
|
# Remove the log files
|
||||||
ynh_secure_remove --file="/var/log/$app/"
|
ynh_secure_remove --file="/var/log/$app/"
|
||||||
|
|
||||||
|
|
|
@ -105,8 +105,8 @@ ynh_script_progression --message="Installing Node-RED..." --weight=30
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
exec_as $app env PATH=$PATH npm install --production
|
exec_as $app env PATH=$PATH npm install --production
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -121,7 +121,7 @@ ynh_add_nginx_config
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
if [ ! -f $final_path/data/settings.js ]; then
|
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
|
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="//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"
|
ynh_replace_string --match_string="//ui: { path: "ui" }," --replace_string="ui: { path: "/ui/" }," --target_file="$final_path/data/settings.js"
|
||||||
|
|
Loading…
Add table
Reference in a new issue