mirror of
https://github.com/YunoHost-Apps/gancio_ynh.git
synced 2024-09-03 20:36:19 +02:00
Add nodeJS during upgrade + upgrade dependencies
This commit is contained in:
parent
3d0f720086
commit
e6297b74d0
1 changed files with 18 additions and 6 deletions
|
@ -82,6 +82,14 @@ fi
|
||||||
# ownership to all files such as after the ynh_setup_source step
|
# ownership to all files such as after the ynh_setup_source step
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=10
|
||||||
|
|
||||||
|
# Install Nodejs
|
||||||
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -115,12 +123,16 @@ ynh_add_config --template="config.json" --destination="$install_dir/config.json"
|
||||||
chmod 400 "$install_dir/some_config_file"
|
chmod 400 "$install_dir/some_config_file"
|
||||||
chown $app:$app "$install_dir/some_config_file"
|
chown $app:$app "$install_dir/some_config_file"
|
||||||
|
|
||||||
### For more complex cases where you want to replace stuff using regexes,
|
#=================================================
|
||||||
### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
|
# CONFIGURE THE APP
|
||||||
### When doing so, you also need to manually call ynh_store_file_checksum
|
#=================================================
|
||||||
###
|
ynh_script_progression --message="Updating app dependencies..." --weight=15
|
||||||
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$install_dir/some_config_file"
|
|
||||||
### ynh_store_file_checksum --file="$install_dir/some_config_file"
|
pushd $install_dir
|
||||||
|
ynh_use_nodejs
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install # Install dependencies
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue