mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
Fix package linter and update install badge
This commit is contained in:
parent
78d3258b74
commit
b7299e728d
4 changed files with 12 additions and 11 deletions
|
@ -2,7 +2,7 @@ pgAdmin for yunohost
|
|||
====================
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/pgadmin.svg)](https://dash.yunohost.org/appci/app/pgadmin) ![](https://ci-apps.yunohost.org/ci/badges/pgadmin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pgadmin.maintain.svg)
|
||||
[![Install pgadmin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=pgadmin)
|
||||
[![Install pgadmin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pgadmin)
|
||||
|
||||
> *This package allow you to install pgadmin quickly and simply on a YunoHost server.
|
||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||
|
|
|
@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
|
|||
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)
|
||||
|
@ -28,20 +28,20 @@ app_sub_version=$(echo $app_version | cut -d'-' -f2)
|
|||
#=================================================
|
||||
|
||||
# BACKUP THE APP MAIN DIR
|
||||
ynh_script_progression --message="Backing up the main app directory..."
|
||||
ynh_print_info --message="Backing up the main app directory..."
|
||||
ynh_backup --src_path "$final_path"
|
||||
|
||||
# Backup config
|
||||
ynh_script_progression --message="Backing configuration..."
|
||||
ynh_print_info --message="Backing 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..."
|
||||
ynh_print_info --message="Backing up data..."
|
||||
ynh_backup --src_path "/var/lib/pgadmin"
|
||||
ynh_script_progression --message="Backing up log..."
|
||||
ynh_print_info --message="Backing up log..."
|
||||
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
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
||||
|
|
|
@ -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,8 @@ 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" --quiet
|
||||
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -67,8 +68,8 @@ ynh_script_progression --message="Protecting directory..."
|
|||
set_permission
|
||||
|
||||
# Restrict access to admin only
|
||||
ynh_script_progression --message="Configuring permissions..."
|
||||
yunohost app addaccess --users=$admin $app
|
||||
ynh_script_progression --message="Configuring permissions"
|
||||
ynh_permission_update --permission="main" --remove="all_users" --add=$admin
|
||||
|
||||
# Configuration de logrotate
|
||||
ynh_script_progression --message="Configuring log rotation..."
|
||||
|
|
Loading…
Reference in a new issue