Skip to content
Snippets Groups Projects
Commit 9fff9225 authored by Erick Hitter's avatar Erick Hitter
Browse files

Fixes from testing

parent 42f1e881
No related branches found
No related tags found
1 merge request!1Convert to Golang
Pipeline #
...@@ -11,12 +11,15 @@ Pipe logs to Mattermost (or Slack) webhooks ...@@ -11,12 +11,15 @@ Pipe logs to Mattermost (or Slack) webhooks
1. `git clone https://git.ethitter.com/debian/eth-log-alerting.git /usr/local/bin/eth-log-alerting` 1. `git clone https://git.ethitter.com/debian/eth-log-alerting.git /usr/local/bin/eth-log-alerting`
1. `cd /usr/local/bin/eth-log-alerting` 1. `cd /usr/local/bin/eth-log-alerting`
1. `go get github.com/42wim/matterbridge/matterhook`
1. `go get github.com/asaskevich/govalidator`
1. `go get github.com/hpcloud/tail`
1. `go build eth-log-alerting.go` 1. `go build eth-log-alerting.go`
1. `cp /usr/local/bin/eth-log-alerting/init.sh /etc/init.d/eth-log-alerting` 1. `cp /usr/local/bin/eth-log-alerting/init.sh /etc/init.d/eth-log-alerting`
1. `chmod +x /etc/init.d/eth-log-alerting` 1. `chmod +x /etc/init.d/eth-log-alerting`
1. `cp /usr/local/bin/eth-log-alerting/config-sample.json /usr/local/bin/eth-log-alerting/config.json` 1. `cp /usr/local/bin/eth-log-alerting/config-sample.json /usr/local/bin/eth-log-alerting/config.json`
1. Edit `/usr/local/bin/eth-log-alerting/config.json` 1. Edit `/usr/local/bin/eth-log-alerting/config.json`
1. `cp /usr/local/bin/eth-log-alerting/defaults /etc/default/eth_log_alerting` 1. `cp /usr/local/bin/eth-log-alerting/defaults /etc/default/eth-log-alerting`
1. Edit `/etc/default/eth_log_alerting` 1. Edit `/etc/default/eth_log_alerting`
1. `update-rc.d eth-log-alerting defaults` 1. `update-rc.d eth-log-alerting defaults`
1. `/etc/init.d/eth-log-alerting start` 1. `/etc/init.d/eth-log-alerting start`
...@@ -37,7 +37,7 @@ case $1 in ...@@ -37,7 +37,7 @@ case $1 in
log_daemon_msg "Starting the process" "$NAME" log_daemon_msg "Starting the process" "$NAME"
# Start the daemon with the help of start-stop-daemon # Start the daemon with the help of start-stop-daemon
# Log the message appropriately # Log the message appropriately
if start-stop-daemon --start --chuid $USER --background --oknodo --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- "$DAEMON_ARGS"; then if start-stop-daemon --start --chuid $USER --background --oknodo --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- $DAEMON_ARGS; then
log_end_msg 0 log_end_msg 0
else else
log_end_msg 1 log_end_msg 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment