peep
peep a process
Description
Watch a process using $PID and execute specified command for notification when finished.
It can also watch a remote command.
Installation
go get
% go get github.com/Songmu/peep/cmd/peep
% go get github.com/Songmu/peep/cmd/peep-notify
homebrew
% brew install Songmu/tap/peep
% ghg get Songmu/peep
Built binaries are available on gihub releases.
https://github.com/Songmu/peep/releases
Synopsis
Easy Usage
% peep [-H user@host -p $PORT] $PID -- peep-notify slack
Custom Notification Script
% peep [-H user@host -p $PORT] $PID -- /path/to/your-notification-script
Commands
- peep
- peep-notify
- bundled command to notify easily which supports slack, pushpullet and mac desktop notification.
Result JSON
The custom notification script accepts a result JSON via STDIN that reports command result like following.
{
"user": "Songmu",
"command": "perl -E say $$; sleep 10",
"startAt": "2018-12-31T17:29:56+09:00",
"endAt": "2018-12-31T17:30:07+09:00",
"host": "localhost",
"pid":20028
}
See Also
Author
Songmu