mirror of
https://github.com/YunoHost-Apps/grist_ynh.git
synced 2024-09-03 20:36:18 +02:00
Fix upgrade
This commit is contained in:
parent
ac959fd8f5
commit
4c47637a89
2 changed files with 12 additions and 9 deletions
|
@ -38,8 +38,8 @@ ldap = "true"
|
|||
sso = "true"
|
||||
|
||||
# FIXME: replace with an **estimate** minimum disk and RAM requirements. e.g. 20M, 400M, 1G...
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
disk = "15G"
|
||||
ram.build = "1500M"
|
||||
ram.runtime = "50M"
|
||||
|
||||
[install]
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# INSTALL NODEJS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
|
@ -39,6 +34,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
#=================================================
|
||||
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
|
||||
#=================================================
|
||||
|
@ -105,8 +108,8 @@ ynh_add_config --template="default.env" --destination="$install_dir/default.env"
|
|||
# FIXME: this should be handled by the core in the future
|
||||
# You may need to use chmod 600 instead of 400,
|
||||
# for example if the app is expected to be able to modify its own config
|
||||
chmod 400 "$install_dir/some_config_file"
|
||||
chown $app:$app "$install_dir/some_config_file"
|
||||
chmod 400 "$install_dir/default.env"
|
||||
chown $app:$app "$install_dir/default.env"
|
||||
|
||||
### 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)
|
||||
|
|
Loading…
Reference in a new issue