Article View: alt.privacy.anon-server
Article #312347Re: Ping redjohn
From: SEC3
Date: Thu, 17 Dec 2020 16:32
Date: Thu, 17 Dec 2020 16:32
62 lines
2539 bytes
2539 bytes
On 2020-12-17 8:18 a.m., inwtx wrote:
>>
>> Appears that mixmaster stopped running. I just rebooted my server
>> and things are moving again.
>>
>
> Here is a small script I run every 5 minutes to check that certain
> programs are running.
>
>
>
> #!/bin/bash
>
> ## PgmsRunningGlobalChk.sh
> ## Add/insert the program name into the array list.
> ## Place your home email address in the emailaddr= field.
>
> ## Cron: */5 * * * * /root/PgmsRunningGlobalChk.sh &> /dev/null
>
>
> filePath=${0%/*} # current file path
>
> emailaddr="your@email.address"
>
> array=(
> "mixmaster" # mixmaster
> "yamn" # yamn
> "master" # nginx
> "qmgr" # postfix
> )
>
> for index in ${!array[*]}; do
> varpgm=${array[index]}
>
> if [[ $(pgrep --exact -x $varpgm) == "" ]]; then
> mutt -s "Warning: Program not running - $varpgm" $emailaddr <<< "Warning: Program not running - $varpgm" # send error
> fi
>
> done
>
> exit 0
>
This is useful. Thanks for sharing.
For my servers I have been using an online notification service called
UptimeRobot <https://uptimerobot.com> which sends an email when it
notices the server is unreachable. But using your script in addition to
uptimerobot.com is an even better solution since if the entire box goes
offline your script won't be able to notify. But UptimeRobot will.
--
SEC3
Contact info and PGP key: <https://sec3.net>
List of Tor Hidden Services
<https://github.com/sec3pinger/tor-hidden-services>
List of Nym Keys
<https://github.com/sec3pinger/nym-keys>
YAMN Help
<https://sec3.net/yamnhelp/>
Technical Details
Message-ID:
<LKLCH.39543$EA2.698@fx01.iad>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<20201217021750.E91391201BB@fleegle.mixmin.net> <rrflre$tf6$1@news.mixmin.net>Show Full Headers
Complete Article Headers
Message-ID: <LKLCH.39543$EA2.698@fx01.iad> Subject: Re: Ping redjohn Date: Thu, 17 Dec 2020 11:32:42 -0500 From: SEC3 <noreply@sec3.net> References: <20201217021750.E91391201BB@fleegle.mixmin.net> <rrflre$tf6$1@news.mixmin.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: alt.privacy.anon-server User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Mime-Version: 1.0 In-Reply-To: <rrflre$tf6$1@news.mixmin.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Lines: 62 X-Complaints-To: abuse@blocknews.net Nntp-Posting-Date: Thu, 17 Dec 2020 16:32:43 UTC Organization: blocknews - www.blocknews.net