Exit if any APT processes runs

This commit is contained in:
Jeremy Gardais 2020-06-19 10:30:13 +02:00
parent e522d78cb0
commit 0505db5082
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 0 deletions

View File

@ -208,6 +208,7 @@ main() { # {{{
| cut -d"'" -f2 )" | cut -d"'" -f2 )"
maco_proc_pattern="(/opt/maco/bin/maco.autoupdate.sh)" maco_proc_pattern="(/opt/maco/bin/maco.autoupdate.sh)"
apt_proc_pattern="(aptitude.*full-upgrade|/usr/bin/dpkg.*--configure|dpkg-deb|/bin/sh /usr/lib/needrestart/dpkg-status)"
## If APT package upgrade is available ## If APT package upgrade is available
### Exit (wait for APT upgrade to finish first) ### Exit (wait for APT upgrade to finish first)
@ -234,6 +235,11 @@ main() { # {{{
is_proc_running "${maco_proc_pattern}" \ is_proc_running "${maco_proc_pattern}" \
&& exit 0 && exit 0
## If anything related to APT is currently running
### Exit
is_proc_running "${apt_proc_pattern}" \
&& exit 0
} }
# }}} # }}}