Skip to content

Commit

Permalink
Send your url as first argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mdom committed Mar 14, 2017
1 parent f378ae3 commit 3e57ab2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ using apache requestlogs. And that's exactly what smokesignal is doing.
$ smokesignal send "foobar" "http://foo.example.org/topic" "http://bar.example.org/topic"
$ smokesignal read "/topic" /var/log/apache.log

Currently only combined apache log is supported. Your username is send as referer.
The first url for send is your url endpoint, the remaining urls are
the recipients. Currently only combined apache log is supported. Your
username is send as referer.

# License

Expand Down
9 changes: 5 additions & 4 deletions bin/smokesignal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ die () {

usage () {
printf "%s\n" "$program_name"
printf "\t%s\n" "read URL LOGFILE" "send MSG URL..."
printf "\t%s\n" "read URL LOGFILE" "send MSG YOUR_URL REMOTE_URL..."
}

main () {
Expand All @@ -22,10 +22,11 @@ main () {
}

send_msg () {
msg=$1
shift
msg="$1"
your_url="$2"
shift 2
for url;do
curl -sS --user-agent "$msg" --referer "${USER}" "$url" >/dev/null
curl -sS --user-agent "$msg" --referer "${your_url}" "$url" >/dev/null
done
}

Expand Down

0 comments on commit 3e57ab2

Please sign in to comment.