diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-22 01:11:25 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-22 01:11:25 +0200 |
commit | d21e0b0ef80402e6bb610ba086dc81ad93e451d5 (patch) | |
tree | 44e96d6648c3f04d310a153e08b2c0d28b0cb3ad /utils | |
parent | 5fc17de8617d0d5771578f38f62a9d4714054747 (diff) | |
download | searxng-d21e0b0ef80402e6bb610ba086dc81ad93e451d5.tar.gz searxng-d21e0b0ef80402e6bb610ba086dc81ad93e451d5.zip |
[fix] old images need an initial 'apt update'
see https://github.com/asciimoo/searx/pull/1803#issuecomment-616684353
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/lib.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/lib.sh b/utils/lib.sh index eb55f356b..922227a89 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -1216,6 +1216,8 @@ uWSGI_disable_app() { # distro's package manager # ------------------------ +_apt_pkg_info_is_updated=0 + pkg_install() { # usage: TITEL='install foobar' pkg_install foopkg barpkg @@ -1230,6 +1232,10 @@ pkg_install() { fi case $DIST_ID in ubuntu|debian) + if [[ $_apt_pkg_info_is_updated == 0 ]]; then + export _apt_pkg_info_is_updated=1 + apt update + fi # shellcheck disable=SC2068 apt-get install -m -y $@ ;; |