2013-03-16 17:54:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
NOTIFY_ICON=/usr/share/qubes/icons/dom0-update-avail.svg
|
|
|
|
UPDATES_STAT_FILE=/var/lib/qubes/updates/dom0-updates-available
|
2014-04-11 05:04:57 +00:00
|
|
|
UPDATES_DISABLE_FLAG=/var/lib/qubes/updates/disable-updates
|
|
|
|
|
|
|
|
if [ -f "$UPDATES_DISABLE_FLAG" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
2013-03-16 17:54:00 +00:00
|
|
|
|
|
|
|
# If no updates available - exit here
|
|
|
|
qubes-dom0-update --check-only >/dev/null && exit
|
|
|
|
RETCODE=$?
|
|
|
|
|
|
|
|
if [ "$RETCODE" -ne 100 ]; then
|
|
|
|
echo "ERROR: Error checking for updates" >&2
|
|
|
|
exit $RETCODE
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Touch stat file for qubes-manager
|
2015-12-13 01:07:01 +00:00
|
|
|
touch "$UPDATES_STAT_FILE"
|
|
|
|
chgrp qubes "$UPDATES_STAT_FILE"
|
|
|
|
chmod g+w "$UPDATES_STAT_FILE"
|