Bug 15303 Followup: Fix apt-cache show breaking koha-create

Temporarely set +e so the test for the LE package does not break
koha-create

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Mirko Tietgen 2016-04-15 18:03:55 +02:00 committed by Kyle M Hall
parent 28109bbc5e
commit e14534ed96

View file

@ -331,8 +331,11 @@ enable_sru_server()
check_letsencrypt()
{
if [ $(dpkg-query -W -f='${Status}' letsencrypt 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
set +e
apt-cache show letsencrypt &>/dev/null
if [ $? -eq 0 ]; then
local aptcacheshow=$?
set -e
if [ $aptcacheshow -eq 0 ]; then
read -r -p "The letsencrypt package is not installed. Do it now? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
apt-get install -y letsencrypt