mirror of
https://github.com/YunoHost-Apps/pufferpanel_ynh.git
synced 2024-09-03 20:16:03 +02:00
fix
This commit is contained in:
parent
9e0727f460
commit
5783fc2152
4 changed files with 20 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
|||
"logs": "/var/log/__APP__",
|
||||
"panel": {
|
||||
"database": {
|
||||
"dialect": "sqlite3",
|
||||
"url": "file:/var/lib/__APP__/database.db?cache=shared"
|
||||
"dialect": "postgresql",
|
||||
"url": "user=__DB_USER__ password=__DB_PWD__ dbname=__DB_NAME__ port=9920 sslmode=disable"
|
||||
},
|
||||
"web": {
|
||||
"files": "__INSTALL_DIR__"
|
||||
|
|
|
@ -54,9 +54,12 @@ ram.runtime = "50M"
|
|||
main.auth_header = false
|
||||
|
||||
[resources.apt]
|
||||
packages = "sqlite3"
|
||||
packages = "postgresql"
|
||||
|
||||
extras.pufferpanel.repo = "deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main"
|
||||
extras.pufferpanel.key = "https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
||||
extras.pufferpanel.packages = "pufferpanel"
|
||||
|
||||
[resources.database]
|
||||
type = "postgresql"
|
||||
|
|
@ -34,6 +34,13 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_backup --src_path="/etc/$app/"
|
||||
ynh_backup --src_path="/var/lib/$app/"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
ynh_print_info --message="Backing up the PostgreSQL database..."
|
||||
|
||||
ynh_psql_dump_db --database="$db_name" > db.sql
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -21,6 +21,13 @@ ynh_restore_file --origin_path="$install_dir"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
|
||||
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
||||
|
||||
#=================================================
|
||||
# RESTORE VARIOUS FILES
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue