Skip to content

Commit

Permalink
update: improve check for apt (#1356)
Browse files Browse the repository at this point in the history
fix check for running apt during update
(#1354)

Update script is exiting if any process contains 'apt' in the name. pgrep interpretes <pattern> as regular expression. Whole process name to be checked with option -x.
  • Loading branch information
ChristophRg authored Oct 5, 2021
1 parent 31f20bc commit 7c361c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ samba
"
fi

# check running apt
pgrep apt &>/dev/null && { echo "apt is currently running. Try again later"; exit 1; }
# check running apt or apt-get
pgrep -x "apt|apt-get" &>/dev/null && { echo "apt is currently running. Try again later"; exit 1; }

cp etc/library.sh /usr/local/etc/

Expand Down

0 comments on commit 7c361c5

Please sign in to comment.