I use Ubuntu 16.04 with Nginx and a few WordPress sites. Sometimes I don't visit a site for a long time (>=1 month) and it might be that the site is down.
I'm looking for a small Nix utility that will email my Gmail account, if one of my Nginx-WordPress sites is down (without mentioning a reason...
Experienced with network monitoring tools? Which will you say is the simplest from these? Cacti, Check MK, Icinga, Nagios, NeDi, OpenNMS, Shinken, Vigilo NMS, Zabbix
@JeffSchaller (related to your answer on that cat question) I was asked to debug what I presume must be a very old shell script today. It had things like if [ "``set -f; $echo $variable | sed 'sedscript'``" ]; then in it (yes, $echo was set to /usr/bin/echo, /bin/echo or just echo depending on which it found first). Presumably, it was written on a system where echo possibly even included the quotes in "$variable" in its output (original Bourne shell?).
(double backtick should be single backticks above. I never get the markup right with those)
@user9303970 as an aside from me, if you're not asking about NixOS, I would suggest using "nix or, since you're on the U&L site, dropping "Nix" altogether.
sigh asterisks are special. *nix maybe?
there we go.
@Kusalananda did the markup eat the quotes around $variable, or did you mean that $variable might contain double-quotes? I lost the train of the thought in the question, sorry
@JeffSchaller No, the script used set -f inside a command substitution to be able to echo the value of a variable without quoting it, to sed for modification. Today we can use built-in and standard parameter substitutions for things like that.
I was debugging this code as I saw that answer from you, that's all.
@Kusalananda ahhhh, yes. Thanks for spelling it out; the caffeine clearly hasn't taken hold of me yet. It is not often that you see set -f, although I suppose it's encouraging to see someone trying to be careful.
@ilkkachu I saw other answers popping up, and kept checking to see who might be tackling the bigger problem of parsing ls ... guess I wasted too much time refreshing :) Well done!
shoot, and I didn't quote my variables! (ninja edit)