mirror of
https://github.com/YunoHost-Apps/scrumblr_ynh.git
synced 2024-09-03 20:16:29 +02:00
test upgrade
This commit is contained in:
parent
a310de9974
commit
cedccc2cc3
1 changed files with 7 additions and 5 deletions
|
@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
if [ $(ynh_compare_current_package_version --comparison gt --version "0.2.0~ynh1" ]
|
||||
if [ $(ynh_compare_current_package_version --comparison gt --version "0.2.0~ynh1") ]
|
||||
then
|
||||
redis_port=$(ynh_app_setting_get --app=$app --key=redis_port)
|
||||
fi
|
||||
|
@ -54,7 +54,7 @@ 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"
|
||||
|
||||
if [ $(ynh_compare_current_package_version --comparison lt --version "0.2.0~ynh2" ]
|
||||
if [ $(ynh_compare_current_package_version --comparison lt --version "0.2.0~ynh2") ]
|
||||
then
|
||||
ynh_systemd_action --service_name=redis-$app --action="stop" --log_path="/var/log/$app/redis-$app.log"ls
|
||||
fi
|
||||
|
@ -112,9 +112,11 @@ fi
|
|||
#=================================================
|
||||
# MIGRATE DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="migrating database..." --weight=1
|
||||
ynh_script_progression --message="migrating database... $(ynh_package_version --package=scrumblr)" --weight=1
|
||||
|
||||
if [ $(ynh_compare_current_package_version "0.2.0~ynh1" ]
|
||||
|
||||
|
||||
if [ $(ynh_compare_current_package_version --comparison lt --version "0.2.0~ynh2") ]
|
||||
then
|
||||
pushd $final_path
|
||||
redis-cli --rdb "redis-$app.rdb"
|
||||
|
@ -125,7 +127,7 @@ fi
|
|||
# REDIS CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
if [ $(ynh_compare_current_package_version --comparison lt --version "0.2.0~ynh2" ]
|
||||
if [ $(ynh_compare_current_package_version --comparison lt --version "0.2.0~ynh2") ]
|
||||
then
|
||||
# Find an available port for redis
|
||||
redis_port=$(ynh_find_port --port=8081)
|
||||
|
|
Loading…
Add table
Reference in a new issue