tpotce/_deprecated/installer/debian/sudo-install.sh
2023-06-26 17:41:30 +02:00

10 lines
256 B
Bash
Executable file

#!/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