Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott committed Sep 18, 2017
0 parents commit d1a6001
Show file tree
Hide file tree
Showing 11 changed files with 673 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/local/
/.idea/
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# EasyPing
####Version 0.1

##How to Install
####Requirements:
* Linux
* Perl 5.24+
* SMTP Server (Does not do user/pass or TLS/SSL at this time)
#####
To install extract the release with tar xvzf EasyPing_0.1.tar.gz

* `cd EasyPing dir`
* `sudo apt-get install libdev-ssl`
* `sudo apt-get install cpanminus`
* `sudo cpanm Carton`
* `carton install --deployment`

* edit the db/settings.csv to set the SMTP IP address and the from email address.
* edit the db/hosts.csv and add in the hosts and for email you can do one email address or multiple
by "email1@domain.com,email2@domain.com" Do not put spaces, but wrap in quotes.

Once the settings and hosts have been created you can run the script with the following command:

* `carton exec run.pl`

This should output SUCCESS or FAIL and end with an execution time, you want to keep
the execution time under the time it takes for the cron to run. If you check every 5 minutes,
the script shouldn't take 5 minutes to run.

##How to Cron
* `vim /etc/cron.d/EasyPing`
* `*/5 * * * * usertorunas /path/to/carton exec /path/to/run.pl`
7 changes: 7 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
requires 'Time::HiRes', '0';
requires 'Data::Dumper', '0';
requires 'Moo', '0';
requires 'Net::SMTP', '0';
requires 'namespace::clean', '0';
requires 'DBD::CSV', '0';
requires 'Net::Ping::External', '0';
Loading

0 comments on commit d1a6001

Please sign in to comment.