02-24-2016, 10:58 PM
shaggytwodope, how about an option to switch between the dark and light tray icon from the right-click menu?
In /usr/scripts/updates-gui is a method that kills synaptic and gdebi-gtk if they are open.
If there is an install process running that causes problems.
What if a loop runs untill the lock is released or the user clicks Cancel?
Something like:
In /usr/scripts/updates-gui is a method that kills synaptic and gdebi-gtk if they are open.
Code:
# 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
fi
What if a loop runs untill the lock is released or the user clicks Cancel?
Something like:
Code:
function 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