I have just been writing a bash script for one of our client's servers that basically checks whether postfix is running and, if not, alerts me and then starts it (their postfix has been dying whenever one of their programs needs to update). It isn't really a workable permanent fix, but they are getting a new server in a few weeks so it is more of a bandaid...
Anyhow,
First I needed to check whether Postfix was running using "ps aux". Now generally in my scripts I use the acronym PS for postfix (PF is taken), so I think on what to call my variable for the ps aux output, and I figure "Hey! I'll just call it "PS" for postfix and "aux" for whether it is running.
Thus:
I called my variable containing the output of ps aux... "PSaux", although for a completely different reason!
You may note how unfunny that really is, yet for some reason I am still laughing.
Please kill me
Anyhow,
First I needed to check whether Postfix was running using "ps aux". Now generally in my scripts I use the acronym PS for postfix (PF is taken), so I think on what to call my variable for the ps aux output, and I figure "Hey! I'll just call it "PS" for postfix and "aux" for whether it is running.
Thus:
Code:
PSaux=`ps aux | grep -i postfix | wc -l`
I called my variable containing the output of ps aux... "PSaux", although for a completely different reason!
You may note how unfunny that really is, yet for some reason I am still laughing.
Please kill me