mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-25 00:30:29 +00:00
check for sudo via 'command -v' instead of dkpg-query
This commit is contained in:
parent
d0b6ff2d08
commit
27a9642090
7 changed files with 7 additions and 7 deletions
|
@ -36,7 +36,7 @@ if [[ $EUID -eq 0 ]]; then
|
|||
else
|
||||
echo "::: Sudo will be used for debugging."
|
||||
# Check if sudo is actually installed
|
||||
if [[ $(dpkg-query -s sudo) ]]; then
|
||||
if [ -x "$(command -v sudo)" ]; then
|
||||
export SUDO="sudo"
|
||||
else
|
||||
echo "::: Please install sudo or run this as root."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue