From 17f301c2600b10367c37cad2c3c03c74fd7311d3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 10 Jun 2020 11:17:34 +0200 Subject: [PATCH] Bug 25538: Use sudo -i in koha-shell See man sudo, -i parameter. Should we expect regressions? Test plan: 0. Use D11 or U18. Don't apply this patch 1. $ echo $KOHA_INTRANET_URL $ sudo koha-shell kohadev $ echo $KOHA_INTRANET_URL 2. Apply this patch $ cp debian/scripts/koha-shell /usr/sbin/koha-shell 3. Repeat 1. --- debian/scripts/koha-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/scripts/koha-shell b/debian/scripts/koha-shell index 199453ab29..bb74c8073d 100755 --- a/debian/scripts/koha-shell +++ b/debian/scripts/koha-shell @@ -46,7 +46,7 @@ my @su_args; push @su_args, '/usr/bin/sudo'; push @su_args, '--preserve-env' if $opts{'preserve-environment'}; push @su_args, '--login' if $opts{login}; -push @su_args, "-u", "$instance-koha"; +push @su_args, "-u", "$instance-koha", "-i"; push @su_args, "env " . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml " -- 2.20.1