mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
Fix linter warnings
This commit is contained in:
parent
78d3258b74
commit
b36057d95f
6 changed files with 31 additions and 17 deletions
|
@ -14,11 +14,8 @@
|
|||
upgrade=1
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
incorrect_path=1
|
||||
port_already_use=0
|
||||
change_url=1
|
||||
;;; Levels
|
||||
Level 5=auto
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"email": "josue@tille.ch"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.8.0.0"
|
||||
"yunohost": ">= 3.8.1"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
|
|
@ -14,8 +14,11 @@ source /usr/share/yunohost/helpers
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
#=================================================
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
||||
|
@ -24,24 +27,38 @@ app_main_version=$(echo $app_version | cut -d'-' -f1)
|
|||
app_sub_version=$(echo $app_version | cut -d'-' -f2)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
# BACKUP THE APP MAIN DIR
|
||||
ynh_script_progression --message="Backing up the main app directory..."
|
||||
ynh_backup --src_path "$final_path"
|
||||
|
||||
# Backup config
|
||||
ynh_script_progression --message="Backing configuration..."
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
ynh_backup --src_path "/etc/uwsgi/apps-available/$app.ini"
|
||||
|
||||
# Backup Data and LOG
|
||||
ynh_script_progression --message="Backing up data..."
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path "/var/lib/pgadmin"
|
||||
ynh_script_progression --message="Backing up log..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP LOG FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path "/var/log/pgadmin"
|
||||
ynh_backup --src_path "/var/log/uwsgi/$app"
|
||||
|
||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
||||
|
|
|
@ -18,7 +18,7 @@ ynh_script_progression --message="Validating installation parameters..."
|
|||
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$(ynh_normalize_url_path --path_url $YNH_APP_ARG_PATH)
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
db_user="pgadmin"
|
||||
admin_pwd=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||
|
|
|
@ -56,7 +56,7 @@ ynh_psql_execute_as_root \
|
|||
# Restore systemd configuration
|
||||
ynh_script_progression --message="Reconfiguring application..."
|
||||
ynh_check_global_uwsgi_config
|
||||
systemctl enable "uwsgi-app@$app.service"
|
||||
systemctl enable "uwsgi-app@$app.service" --quiet
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -17,7 +17,7 @@ ynh_abort_if_errors
|
|||
# LOAD SETTINGS
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
||||
path_url=$(ynh_app_setting_get --app $app --key path)
|
||||
admin=$(ynh_app_setting_get --app $app --key admin)
|
||||
app_version=$(ynh_app_upstream_version)
|
||||
app_main_version=$(echo $app_version | cut -d'-' -f1)
|
||||
|
|
Loading…
Add table
Reference in a new issue