That needs to be split into two lines. As a single line, it is merely a long comment line and there is nothing to execute.
I suspect that you need to specify which display to pop the window onto. Try this (inserted extra line):
Code:
#!/bin/bash
export DISPLAY=:0.0
tail -f /var/log/messages | grep "attackalert\|UFW BLOCK" | xargs -I {} dialog --ascii-lines --infobox "PortSentry Alert: The system logs indicate one or more port scans were launched against this computer since this script was last executed. See [the log] for details.\n" 7 80
P.S.
Oops, I didn't notice the "-f" on tail (as papibe did). That's bad because it's a never-ending process. And with crontab, you would start another such process every 15 minutes until you had hundreds or thousands of them running.
Bookmarks