From 7ca48b26510260d8a5ae0f5df5e492d558c3fb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:38:21 +0100 Subject: [PATCH] fix --- conf/traccar.xml | 4 ++-- manifest.toml | 4 ++-- scripts/backup | 6 +++--- scripts/restore | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/conf/traccar.xml b/conf/traccar.xml index 722e6c4..48bf5f5 100644 --- a/conf/traccar.xml +++ b/conf/traccar.xml @@ -18,8 +18,8 @@ --> - com.mysql.cj.jdbc.Driver - jdbc:mysql://localhost/__DB_NAME__?zeroDateTimeBehavior=round&serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode='' + org.postgresql.Driver + jdbc:postgresql://localhost/__DB_NAME__ __DB_USER__ __DB_PWD__ diff --git a/manifest.toml b/manifest.toml index de39b05..9de49cb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -67,7 +67,7 @@ ram.runtime = "50M" [resources.ports] [resources.apt] - packages = "mariadb-server, openjdk-11-jre-headless" + packages = "postgresql, openjdk-11-jre-headless" [resources.database] - type = "mysql" + type = "postgresql" diff --git a/scripts/backup b/scripts/backup index 4606e12..d23c6d7 100755 --- a/scripts/backup +++ b/scripts/backup @@ -41,11 +41,11 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= -# BACKUP THE MYSQL DATABASE +# BACKUP THE SQL DATABASE #================================================= -ynh_print_info --message="Backing up the MySQL database..." +ynh_print_info --message="Backing up the PostgreSQL database..." -ynh_mysql_dump_db --database="$db_name" > db.sql +ynh_psql_dump_db --database="$db_name" > db.sql #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 6924ac7..55ad448 100755 --- a/scripts/restore +++ b/scripts/restore @@ -31,11 +31,11 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory chown -R $app:www-data "$data_dir" #================================================= -# RESTORE THE MYSQL DATABASE +# RESTORE THE POSTGRESQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 +ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1 -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS