tpotce/_deprecated/installer/debian/sudo-install.sh

11 lines
256 B
Bash
Raw Normal View History

2023-05-30 10:22:10 +00:00
#!/bin/bash
if ! command -v sudo &> /dev/null
then
echo "sudo is not installed. Installing now..."
su -c "apt-get -y update && apt-get -y install sudo"
su -c "/usr/sbin/usermod -aG sudo $(whoami)"
else
echo "sudo is already installed."
fi