11-20-2014, 10:33 PM
(11-20-2014, 10:16 PM)Jerry link Wrote: Thanks misko, a good quick fix there, What we need long term is a if-else statement that suppresses any errorsHere you go, pall.

Code:
#!/bin/bash
bold=`tput bold`
normal=`tput sgr0`
echo "${bold}**********************"
echo "Linux Lite 2.0 Updates"
echo "**********************${normal}"
echo ""
echo "Linux Lite will now search for updates for your computer."
echo "Once installed, your computer will be up to date."
echo "Simply follow the onscreen instructions."
echo ""
echo "Please enter your password to continue..."
if [ "$(pidof synaptic)" ]
then
sudo killall -9 synaptic
else
echo""
fi
if [ -z "$(pgrep gdebi-gtk)" ]
then
echo ""
else
killall -9 gdebi-gtk
fi
sudo apt-get update && sudo apt-get upgrade
echo ""
echo "Updates complete."
echo "This window will now close."
sleep 5