1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/petrolette_ynh.git synced 2024-09-03 19:56:26 +02:00

set port in config file

This commit is contained in:
Tobias Ollive 2021-06-11 12:42:56 +02:00
parent 5c3bdd87b5
commit 5290d40d1b
2 changed files with 7 additions and 0 deletions

View file

@ -95,6 +95,9 @@ ynh_system_user_create --username=$app --home_dir=$final_path
ynh_script_progression --message="Installing application using node..." ynh_script_progression --message="Installing application using node..."
pushd $final_path pushd $final_path
# set port in configuration file
sed -i "/HTTP_PORT/s/[0-9]*[0-9]/$port/" package.json
sed -i "/HTTPS_PORT/s/[0-9]*[0-9]/$https_port/" package.json
# use custom home value to avoid bower storing values in root and have right errors # use custom home value to avoid bower storing values in root and have right errors
[[ -v HOME ]] && TMP_HOME=$HOME [[ -v HOME ]] && TMP_HOME=$HOME
HOME=$(pwd) HOME=$(pwd)

View file

@ -84,6 +84,10 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_script_progression --message="Upgrading the app..." --weight=5 ynh_script_progression --message="Upgrading the app..." --weight=5
pushd $final_path pushd $final_path
# set port in configuration file
sed -i "/HTTP_PORT/s/[0-9]*[0-9]/$port/" package.json
sed -i "/HTTPS_PORT/s/[0-9]*[0-9]/$https_port/" package.json
TMP_HOME=$HOME TMP_HOME=$HOME
HOME=$(pwd) HOME=$(pwd)
ynh_use_nodejs ynh_use_nodejs