Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Rössig <91801557+ChristophRg@users.noreply.github.com>2021-10-05 22:26:26 +0300
committerGitHub <noreply@github.com>2021-10-05 22:26:26 +0300
commit7c361c5cb482cd9152ee613dad343ba6de3f182a (patch)
treec44354c4cebffe31d9a4f7b0193afd557b158698
parent31f20bcb2590bdb255202fea0feeb43c921cbfff (diff)
update: improve check for apt (#1356)v1.40.1
fix check for running apt during update (https://github.com/nextcloud/nextcloudpi/issues/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.
-rwxr-xr-xupdate.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/update.sh b/update.sh
index 9d0ebecd..0e99b006 100755
--- a/update.sh
+++ b/update.sh
@@ -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/