Fix issue where livesession is updated automatically, tidy init scripts

This commit is contained in:
natemaia
2018-05-12 11:00:19 -07:00
parent 14637331e0
commit 34ef33b9a9
8 changed files with 35 additions and 49 deletions

View File

@ -9,9 +9,9 @@ while true; do
if ping -c1 8.8.8.8 &>/dev/null; then
ID=$(ip link | awk '/state UP/ {print $2}')
if [[ $ID == e* ]]; then
echo "$ethernet_connected" ; sleep 10
echo "$ethernet_connected" ; sleep 20
else
echo "$wireless_connected" ; sleep 10
echo "$wireless_connected" ; sleep 20
fi
else
echo "$disconnected" ; sleep 0.6

View File

@ -3,33 +3,33 @@
BAR_ICON=""
ICON=/usr/share/icons/gnome/32x32/apps/system-software-update.png
total() { UPD=$(checkupdates | wc -l) ;}
while true; do
updates=$(checkupdates | wc -l)
total
if hash notify-send &>/dev/null; then
if [[ $updates -gt 50 ]]; then
notify-send -u critical -i $ICON \
"You really need to update soon!!" "$updates New package updates"
elif [[ $updates -gt 25 ]]; then
notify-send -u normal -i $ICON \
"You should update soon" "$updates New package updates"
elif [[ $updates -gt 2 ]]; then
notify-send -u low -i $ICON "$updates New package updates"
if [[ $UPD -gt 50 ]]; then
notify-send -u critical -i $ICON "You really need to update!!" "$UPD New packages"
elif [[ $UPD -gt 25 ]]; then
notify-send -u normal -i $ICON "You should update soon" "$UPD New packages"
elif [[ $UPD -gt 2 ]]; then
notify-send -u low -i $ICON "$UPD New packages"
fi
fi
while [[ $updates -gt 0 ]]; do
if [[ $updates -eq 1 ]]; then
echo "$updates Update"
elif [[ $updates -gt 1 ]]; then
echo "$updates Updates"
while [[ $UPD -gt 0 ]]; do
if [[ $UPD -eq 1 ]]; then
echo "$UPD Update"
elif [[ $UPD -gt 1 ]]; then
echo "$UPD Updates"
fi
sleep 8
updates=$(checkupdates | wc -l)
sleep 10
total
done
while [[ $updates -eq 0 ]]; do
while [[ $UPD -eq 0 ]]; do
echo $BAR_ICON
sleep 1600
updates=$(checkupdates | wc -l)
sleep 1800
total
done
done