Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/theakito/procwatch

Get notified by e-mail or notification, once a Linux process finishes.
https://github.com/theakito/procwatch

Last synced: 29 days ago
JSON representation

Get notified by e-mail or notification, once a Linux process finishes.

Awesome Lists containing this project

README

        

[![nimble](https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble.png)](https://nimble.directory/pkg/procwatch)

[![Source](https://img.shields.io/badge/project-source-2a2f33?style=plastic)](https://github.com/theAkito/procwatch)
[![Language](https://img.shields.io/badge/language-Nim-orange.svg?style=plastic)](https://nim-lang.org/)

![Last Commit](https://img.shields.io/github/last-commit/theAkito/procwatch?style=plastic)

[![GitHub](https://img.shields.io/badge/license-GPL--3.0-informational?style=plastic)](https://www.gnu.org/licenses/gpl-3.0.txt)
[![Liberapay patrons](https://img.shields.io/liberapay/patrons/Akito?style=plastic)](https://liberapay.com/Akito/)

## What
Uses the `/proc` pseudo-filesystem, to notify of completed Linux processes.

## Why
Compiling Gentoo or compiling Linux on a Raspberry Pi 0 W can take days.
If you do not want to check, when the compilation has finally finished, but instead be automatically notified on completion, this is the app for you.

## How
If you want to build the project yourself, you need `libssl` and `libdbus` development libraries.

Example installation for Debian based distributions:
```bash
apt install -y libdbus-1-dev libssl-dev
```

### Docker
When using Docker, only providing a PID works.
Providing a process name does not work, as the app inside the container has no access to the host system, besides the mounted volumes.

```bash
declare -r name=procwatch
mkdir -p "${name}/config"
cd "${name}"
docker run \
--rm \
--name "${name}" \
--user "$(id -u):$(id -g)" \
--volume "/proc:/data/proc"\
--volume "./${name}/config:/data/config" \
-it "akito13/${name}"
1234 # Replace `1234` with the PID you are watching.
```

For usage information, check out the [Usage Guide](https://github.com/theAkito/procwatch/wiki/Usage-Guide).

## Where
For now, you can download pre-compiled binaries in the Releases section of this repository.
It is planned to package this properly, once it has reached a rather stable state.

Runs on Linux, what else?

## Goals
* Reliability
* Get process watching done. Do not overload with unnecessary features.

## Project Status
Beta. Unstable API. Model for config JSON will change a lot.

## TODO
* ~~Add Configuration File.~~
* ~~Add multiple E-Mail recipients support.~~
* ~~Add Mattermost support.~~
* ~~Add Matrix support.~~
* ~~Add Rocket.Chat support.~~
* ~~Add Usage Documentation.~~
* ~~Add Gotify support.~~
* ~~Migrate to [pkg/smtp](https://github.com/nim-lang/smtp).~~
* ~~Port to Nim 2.0.4.~~
* ~~Report how long the app waited for the process to finish.~~
* ~~Add name of finished process to notification content.~~
* Add ability to provide multiple contexts of same type.
* Notify, when watcher itself crashed, before target program concluded.
* Allow to notify on each process, when multiple processes are watched.
* Add possibility to test connection to confirm credentials match.
* Add support for TLS connection without StartTLS.
* Add NodeBB support.
* Add Discourse support.
* Add automatically generated messages containing useful information about the finished process.
* Reach Stability.
* Add GPG encryption to applicable notification types, like for example E-Mail.

## License
Copyright © 2022-2024 Akito

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see .