Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/songmu/peep
Watch a process and execute specified command for notification when finished
https://github.com/songmu/peep
go golang
Last synced: 10 days ago
JSON representation
Watch a process and execute specified command for notification when finished
- Host: GitHub
- URL: https://github.com/songmu/peep
- Owner: Songmu
- License: mit
- Created: 2018-12-30T18:45:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-05T12:04:06.000Z (almost 6 years ago)
- Last Synced: 2024-10-11T21:09:24.517Z (27 days ago)
- Topics: go, golang
- Language: Go
- Homepage:
- Size: 45.9 KB
- Stars: 27
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
peep
=======[![Build Status](https://travis-ci.org/Songmu/peep.png?branch=master)][travis]
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]
[![GoDoc](https://godoc.org/github.com/Songmu/peep?status.svg)][godoc][travis]: https://travis-ci.org/Songmu/peep
[license]: https://github.com/Songmu/peep/blob/master/LICENSE
[godoc]: https://godoc.org/github.com/Songmu/peeppeep 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
### using [ghg](https://github.com/Songmu/ghg)
% ghg get Songmu/peep
Built binaries are available on gihub releases.
## Synopsis
### Easy Usage
% peep [-H user@host -p $PORT] $PID -- peep-notify slack
![](https://user-images.githubusercontent.com/177122/50564546-05b53680-0d69-11e9-8d58-748c7469c325.png)
### Custom Notification Script
% peep [-H user@host -p $PORT] $PID -- /path/to/your-notification-script
## Commands
- peep
- main program
- peep-notify
- bundled command to notify easily which supports [slack](https://slack.com), [pushpullet](https://www.pushbullet.com/) and mac desktop notification.## Result JSON
The custom notification script accepts a result JSON via STDIN that reports command result like following.
```json
{
"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
- [horenso](https://github.com/Songmu/horenso)
## Author
[Songmu](https://github.com/Songmu)