diff --git a/README.md b/README.md index d184d24..6e83600 100644 --- a/README.md +++ b/README.md @@ -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.* diff --git a/scripts/backup b/scripts/backup index 52ff421..0630790 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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)." diff --git a/scripts/install b/scripts/install index d9f0cc8..bb35dfa 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/restore b/scripts/restore index d9621c6..3818e8e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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..."