mirror of
https://github.com/YunoHost-Apps/distbin_ynh.git
synced 2024-09-03 18:26:10 +02:00
Fix restore and upgrade
This commit is contained in:
parent
c137af00de
commit
a554f8c5a6
4 changed files with 17 additions and 11 deletions
|
@ -98,6 +98,8 @@ ynh_app_setting_set $app port $port
|
||||||
|
|
||||||
#ynh_install_app_dependencies deb1 deb2
|
#ynh_install_app_dependencies deb1 deb2
|
||||||
|
|
||||||
|
ynh_install_nodejs 8
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -168,8 +170,6 @@ ynh_system_user_create $app
|
||||||
# ...
|
# ...
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_install_nodejs 8
|
|
||||||
|
|
||||||
chown -R $app:$app $final_path
|
chown -R $app:$app $final_path
|
||||||
|
|
||||||
mkdir -p /var/log/$app
|
mkdir -p /var/log/$app
|
||||||
|
|
|
@ -48,6 +48,8 @@ ynh_remove_systemd_config
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
#ynh_remove_app_dependencies
|
#ynh_remove_app_dependencies
|
||||||
|
|
||||||
|
ynh_remove_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE MYSQL DATABASE
|
# REMOVE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -99,8 +101,6 @@ fi
|
||||||
# REMOVE THE CRON FILE
|
# REMOVE THE CRON FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_remove_nodejs
|
|
||||||
|
|
||||||
#npm uninstall -g ts-node
|
#npm uninstall -g ts-node
|
||||||
#npm uninstall -g typescript
|
#npm uninstall -g typescript
|
||||||
|
|
||||||
|
|
|
@ -94,10 +94,7 @@ chown -R $app:$app /var/log/$app
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
#ynh_install_app_dependencies deb1 deb2
|
#ynh_install_app_dependencies deb1 deb2
|
||||||
|
|
||||||
ynh_install_nodejs 11
|
ynh_install_nodejs 8
|
||||||
ynh_use_nodejs
|
|
||||||
npm install -g typescript
|
|
||||||
npm install -g ts-node
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
@ -133,3 +130,4 @@ ynh_restore_file "/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#systemctl reload php5-fpm
|
#systemctl reload php5-fpm
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
sleep 10
|
||||||
|
|
|
@ -92,6 +92,8 @@ ynh_add_nginx_config
|
||||||
|
|
||||||
#ynh_install_app_dependencies deb1 deb2
|
#ynh_install_app_dependencies deb1 deb2
|
||||||
|
|
||||||
|
ynh_install_nodejs 8
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -112,10 +114,15 @@ ynh_system_user_create $app
|
||||||
# ...
|
# ...
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_install_nodejs 11
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
npm install -g typescript
|
npm install hoek@^4.2.1 --save
|
||||||
npm install -g ts-node
|
npm install
|
||||||
|
npm audit fix
|
||||||
|
npm install typescript@>=2.0 --save
|
||||||
|
npm install ts-node
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
||||||
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
|
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
|
||||||
|
@ -167,3 +174,4 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
sleep 10
|
||||||
|
|
Loading…
Add table
Reference in a new issue