mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
cleanup upgrade
This commit is contained in:
parent
2c20bd4065
commit
95a23c4b1e
1 changed files with 6 additions and 7 deletions
|
@ -166,7 +166,7 @@ ynh_add_fpm_config --phpversion="7.3"
|
||||||
ynh_print_info --message="Configuring Kimai2..."
|
ynh_print_info --message="Configuring Kimai2..."
|
||||||
|
|
||||||
local_conf="$final_path/config/packages/local.yaml"
|
local_conf="$final_path/config/packages/local.yaml"
|
||||||
ynh_backup_if_checksum_is_different "$local_conf"
|
ynh_backup_if_checksum_is_different --file="$local_conf"
|
||||||
sudo cp ../conf/local.yaml $local_conf
|
sudo cp ../conf/local.yaml $local_conf
|
||||||
ynh_replace_string --match_string="__APP__" "$app" --target_file="$local_conf"
|
ynh_replace_string --match_string="__APP__" "$app" --target_file="$local_conf"
|
||||||
if [ $registration -eq 1 ]
|
if [ $registration -eq 1 ]
|
||||||
|
@ -175,18 +175,17 @@ then
|
||||||
else
|
else
|
||||||
ynh_replace_string --match_string="__REGISTRATION__" --replace_string="false" --target_file="$local_conf"
|
ynh_replace_string --match_string="__REGISTRATION__" --replace_string="false" --target_file="$local_conf"
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "$local_conf"
|
ynh_store_file_checksum --file="$local_conf"
|
||||||
|
|
||||||
env_conf=$final_path/.env
|
env_conf=$final_path/.env
|
||||||
ynh_backup_if_checksum_is_different "$env_conf"
|
ynh_backup_if_checksum_is_different --file="$env_conf"
|
||||||
# Configure environement
|
# Configure environement
|
||||||
if [ "$database" = "mysql" ]; then
|
if [ "$database" = "mysql" ]; then
|
||||||
# setup application config
|
# setup application config
|
||||||
sudo cp ../conf/.env.mysql $env_conf
|
sudo cp ../conf/.env.mysql $env_conf
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
|
|
||||||
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
||||||
ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="$env_conf"
|
ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="$env_conf"
|
||||||
|
@ -198,7 +197,7 @@ else
|
||||||
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "$env_conf"
|
ynh_store_file_checksum --file="$env_conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE KIMAI2
|
# UPGRADE KIMAI2
|
||||||
|
@ -209,7 +208,7 @@ ynh_install_composer --phpversion="7.3" --workdir="$final_path" --install_args="
|
||||||
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="require laminas/laminas-ldap"
|
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="require laminas/laminas-ldap"
|
||||||
|
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
php7.3 bin/console kimai:update
|
php7.3 bin/console kimai:update -n
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue