From a8ea4ae6f30555360f0767b0839df30b51961544 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. Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart (cherry picked from commit e5ffbb4dd4c3b616f715b74a9091e73e48ff0715) Signed-off-by: Lucas Gass (cherry picked from commit f5f0307e41c9c869eaff8a7082c7f5031e494426) Signed-off-by: Aleisha Amohia (cherry picked from commit c3d6d776318e25a6d304f0f1f9d27e22cf245e6b) Signed-off-by: Victor Grousset/tuxayo --- 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.39.5