1
0
Fork 0
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:
Josué Tille 2020-12-12 15:02:45 +01:00
parent 78d3258b74
commit b7299e728d
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
4 changed files with 12 additions and 11 deletions

View file

@ -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) [![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. > *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.* If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*

View file

@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
ynh_abort_if_errors ynh_abort_if_errors
# LOAD SETTINGS # 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) final_path=$(ynh_app_setting_get --app $app --key final_path)
domain=$(ynh_app_setting_get --app $app --key domain) domain=$(ynh_app_setting_get --app $app --key domain)
db_name=$(ynh_app_setting_get --app $app --key db_name) 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 # 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" ynh_backup --src_path "$final_path"
# Backup config # 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/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path "/etc/uwsgi/apps-available/$app.ini" ynh_backup --src_path "/etc/uwsgi/apps-available/$app.ini"
# Backup Data and LOG # 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_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/pgadmin"
ynh_backup --src_path "/var/log/uwsgi/$app" 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)."

View file

@ -18,7 +18,7 @@ ynh_script_progression --message="Validating installation parameters..."
# RETRIEVE ARGUMENTS FROM THE MANIFEST # RETRIEVE ARGUMENTS FROM THE MANIFEST
domain=$YNH_APP_ARG_DOMAIN 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 admin=$YNH_APP_ARG_ADMIN
db_user="pgadmin" db_user="pgadmin"
admin_pwd=$YNH_APP_ARG_ADMIN_PASSWORD admin_pwd=$YNH_APP_ARG_ADMIN_PASSWORD

View file

@ -56,7 +56,8 @@ ynh_psql_execute_as_root \
# Restore systemd configuration # Restore systemd configuration
ynh_script_progression --message="Reconfiguring application..." ynh_script_progression --message="Reconfiguring application..."
ynh_check_global_uwsgi_config 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 # GENERIC FINALIZATION
@ -67,8 +68,8 @@ ynh_script_progression --message="Protecting directory..."
set_permission set_permission
# Restrict access to admin only # Restrict access to admin only
ynh_script_progression --message="Configuring permissions..." ynh_script_progression --message="Configuring permissions"
yunohost app addaccess --users=$admin $app ynh_permission_update --permission="main" --remove="all_users" --add=$admin
# Configuration de logrotate # Configuration de logrotate
ynh_script_progression --message="Configuring log rotation..." ynh_script_progression --message="Configuring log rotation..."