mirror of
https://github.com/YunoHost-Apps/traccar_ynh.git
synced 2024-09-03 20:35:56 +02:00
commit
4414818530
6 changed files with 14 additions and 10 deletions
|
@ -18,8 +18,8 @@
|
|||
|
||||
-->
|
||||
|
||||
<entry key='database.driver'>com.mysql.cj.jdbc.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.driver'>org.postgresql.Driver</entry>
|
||||
<entry key='database.url'>jdbc:postgresql://localhost/__DB_NAME__</entry>
|
||||
<entry key='database.user'>__DB_USER__</entry>
|
||||
<entry key='database.password'>__DB_PWD__</entry>
|
||||
|
||||
|
@ -34,6 +34,8 @@
|
|||
<entry key='mail.smtp.starttls.enable'>false</entry>
|
||||
<entry key='mail.smtp.username'>__APP__</entry>
|
||||
<entry key='mail.smtp.password'>__MAIL_PWD__</entry>
|
||||
<entry key='mail.smtp.from'>__APP__@__MAIN_DOMAIN__</entry>
|
||||
|
||||
<!--
|
||||
<entry key='ldap.url'>ldap://127.0.0.1</entry>
|
||||
<entry key='ldap.port'>389</entry>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 554 KiB After Width: | Height: | Size: 438 KiB |
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
main_domain=$(cat /etc/yunohost/current_host)
|
||||
|
||||
#=================================================
|
||||
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue