Browse Source

fix https://github.com/Neilpang/acme.sh/issues/2478
support `sudo -i` and `sudo -s`

neilpang 5 years ago
parent
commit
815a3be48b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      acme.sh

+ 2 - 2
acme.sh

@@ -6246,8 +6246,8 @@ _checkSudo() {
       #it's root using sudo, no matter it's using sudo or not, just fine
       return 0
     fi
-    if [ "$SUDO_COMMAND" = "/bin/su" ]; then
-      #it's a normal user doing "sudo su"
+    if [ "$SUDO_COMMAND" = "/bin/su" ] || [ "$SUDO_COMMAND" = "/bin/bash" ]; then
+      #it's a normal user doing "sudo su", or `sudo -i` or `sudo -s`
       #fine
       return 0
     fi