DATE=$(date -d "$1" +"%m%d%Y"); condition=y while [ $condition = "y" ] do
clear
echo "Welcome, please select an option:"
echo "1 - Update Linux"
echo "2 - Upgrade Linux"
echo "3 - Backup your Home directory"
echo "4 - Add New User"
echo "5 - Verify New User"
echo "6 - Applications"
read option
case $option in
1) echo -n "Would you like to Update?"
read update
if [ $update = "y" ]; then
sudo apt-get update
else echo "Needs to be done soon."
fi
;;
2) echo -n "Upgrade to the latest and somewhat greatest?"
read upgrade
if [ $upgrade = "y" ]; then
sudo apt-get upgrade
else echo "Take your time. But not too long."
fi
;;
3) echo -n "Will you like to do a backup of your home directory?"
read backup
if [ $backup = "y" ]; then
tar -cvf backup_on_$DATE.tar /home
else echo "Backup ASAP!"
fi
;;
4) echo "Adding New User"
echo "New Username"
read Username
sudo useradd -m $Username
sudo passwd $Username
echo -n "First Name:"
read firstname
echo -n "Last Name:"
read lastname
echo -n "Phone Number:"
read phone
echo $Username, $firstname, $lastname, $phone >>UserList.txt
;;
5) echo "Searching for User:"
cat UserList.txt
echo "Can you verify $Username is listed?"
read verify
if [ $verify = "y" ]; then
echo "Awesome"
else echo "How the f*** did it not work?"
#it should work. I have tested it many times
fi
;;
6) echo "Install an application:"
echo "1 - Opera Browser"
echo "2 - Spotify"
read application
case $application in
1) echo "Installing Opera Browser"
wget http://deb.opera.com/opera/pool/non-free/o/opera-stable/opera-stable_34.0.2036.25_amd64.deb
sudo dpkg -i opera-stable_34.0.2036.25_amd64.deb
;;
2) echo "Installing Spotify"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client
;;
esac
esac
echo -n "Do you need to do anyting else?"
read condition
done