From e070975e620557dc6554b2bb0d00d191d68fe468 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 11 Dec 2020 19:01:37 +0100 Subject: [PATCH] check if unattended-upgrade active --- scripts/install | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index c47668c..1bbfee9 100644 --- a/scripts/install +++ b/scripts/install @@ -92,9 +92,14 @@ ynh_app_setting_set "$app" language "$language" ### - Remove the section "REMOVE DEPENDENCIES" in the remove script ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script + +pid=$(pgrep -f '/usr/bin/python3 /usr/bin/unattended-upgrade --download-only') +if [ ! -z $pid ] ;then + ynh_script_progression --message="Check and wait end of unattended-upgrade of package_check" -w 1 + tail --pid=$pid -f /dev/null +fi + ynh_script_progression --message="Remove Zabbix if already installed" -w 1 -lsof /var/lib/dpkg/lock-frontend | tail -1 | awk '{print $2}' -ps aux apt-get purge zabbix* -y if compgen -G "/var/cache/apt/archives/zabbix-server-mysql*" > /dev/null; then ynh_secure_remove /var/cache/apt/archives/zabbix-server-mysql*