mirror of
https://github.com/YunoHost-Apps/traccar_ynh.git
synced 2024-09-03 20:35:56 +02:00
fix
This commit is contained in:
parent
07e54e5086
commit
7ca48b2651
4 changed files with 10 additions and 10 deletions
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
|
<entry key='database.driver'>org.postgresql.Driver</entry>
|
||||||
<entry key='database.url'>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=''</entry>
|
<entry key='database.url'>jdbc:postgresql://localhost/__DB_NAME__</entry>
|
||||||
<entry key='database.user'>__DB_USER__</entry>
|
<entry key='database.user'>__DB_USER__</entry>
|
||||||
<entry key='database.password'>__DB_PWD__</entry>
|
<entry key='database.password'>__DB_PWD__</entry>
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ ram.runtime = "50M"
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "mariadb-server, openjdk-11-jre-headless"
|
packages = "postgresql, openjdk-11-jre-headless"
|
||||||
|
|
||||||
[resources.database]
|
[resources.database]
|
||||||
type = "mysql"
|
type = "postgresql"
|
||||||
|
|
|
@ -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"
|
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
|
# END OF SCRIPT
|
||||||
|
|
|
@ -31,11 +31,11 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||||
chown -R $app:www-data "$data_dir"
|
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
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
|
|
Loading…
Reference in a new issue