1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kimai2_ynh.git synced 2024-09-03 19:26:26 +02:00
This commit is contained in:
Éric Gaspar 2024-07-30 09:30:11 +02:00
parent e08e8272c0
commit b002f323f1
4 changed files with 3 additions and 19 deletions

View file

@ -29,9 +29,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================

View file

@ -13,9 +13,6 @@ source /usr/share/yunohost/helpers
# INITIALIZE AND STORE SETTINGS
#=================================================
database="mysql"
ynh_app_setting_set --app="$app" --key=database --value="$database"
random_key=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=random_key --value="$random_key"

View file

@ -27,10 +27,9 @@ setfacl -R -m g:"www-data":rwX -m u:"$app":rwX "$install_dir/var/"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
if [ "$database" = "mysql" ]; then
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql
fi
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql
#=================================================
# RESTORE SYSTEM CONFIGURATIONS

View file

@ -14,15 +14,6 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ "$database" == "sqlite" ]; then
ynh_script_progression --message="Sqlite is not supported by Kimai2 anymore..."
ynh_script_progression --message="Kimai2 will be upgraded to last available version : 1.13"
if ynh_compare_current_package_version --comparison ge --version 1.17.1~ynh1; then
ynh_script_progression --message="Kimai2 sqlite version is already to the last available version, no upgrade will be made"
ynh_die --message="" 0
fi
fi
if [ -z "${registration:-}" ]; then
registration=0
ynh_app_setting_set --app="$app" --key=registration --value="$registration"