02-24-2016, 12:14 PM
That is awesome, shaggytwodope.
“I have not failed. I’ve just found 10,000 ways that won’t work.” - Thomas Edison

(02-24-2016, 12:31 PM)Wirezfree link Wrote:now you are just teasing us....
# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]; then
sudo killall -9 synaptic
fi
if [ ! -z "$(pgrep gdebi-gtk)" ]; then
killall -9 gdebi-gtk
fifunction checklock () {
# Checks for exclusive lock and wait until package managers are closed
while fuser /var/lib/dpkg/lock 2>&1 >/dev/null ; do
echo "# Waiting for other software managers to finish..." $"\n"
if [ "$(pidof synaptic)" ]; then
echo "# Please close any open package managers..." $"\nsynaptic"
fi
echo 1
sleep 1
echo 30
sleep 1
echo 60
sleep 1
if [ ! -z "$(pgrep gdebi-gtk)" ]; then
echo "# Please close any open package managers..." $"\ngdebi-gtk"
fi
echo 95
sleep 1
done | (if ! zenity --progress --title="$APPNAME - close any open package managers" --percentage=20 --auto-close;then killall $(basename $0); exit; fi)
}
checklock
ping -c 1 8.8.8.8 2>&1 | grep "connect: Network is unreachable" &>/dev/null
if [ $? = 1 ]; then
echo Active
else
echo Not connected
fi![[Image: X5qGkCg.png]](https://imgur.com/X5qGkCg.png)