cron-rest-eyes: proper grep order to exclude grep results

This commit is contained in:
Josh Holtrop 2011-11-07 10:48:11 -05:00
parent ceb3b1effd
commit dba4eb1c2f

View File

@ -3,11 +3,11 @@
export DISPLAY=:0 export DISPLAY=:0
# no message if one is displayed already # no message if one is displayed already
if [[ "$(ps -efww | grep -v grep | grep gxmessage)" != "" ]]; then if [[ "$(ps -efww | grep gxmessage | grep -v grep)" != "" ]]; then
exit exit
fi fi
# no message if xscreensaver active # no message if xscreensaver active
if [ "$(ps -efww | grep -v grep | grep xscreensaver)" != "" ]; then if [ "$(ps -efww | grep xscreensaver | grep -v grep)" != "" ]; then
exit exit
fi fi
# no message if gnome-screensaver active # no message if gnome-screensaver active