marchanddesable
Turn off your server when you sleep.
What it does
Give it some IPs, and it will call halt five minutes after the given computers have stopped pinging. Except if we are in the middle of the day or if we are disconnected from the internet (because we don’t want the computer to stop just because the network went off).
Install
The easiest way is to just grab the file marchanddesable.py.
If you want to install it, Marchanddesable is on pypi, so this should do the trick :
pip install marchanddesable
Arch users, you can install marchanddesable from AUR.
Usage
To halt the current machines 5 minutes after both 192.168.0.1 and 192.168.0.2 stop pinging, put this in your crontab. It will also log to the given file and rotate every night:
* * * * * /usr/bin/marchand 192.168.0.1 192.168.0.2 -f /var/log/marchanddesable.log
If you don’t like cron, and think running daemon or programs in screen are better, you can use
marchand -l 192.168.0.1 192.168.0.2
TODO
These features may or may not be implemented at some point :
Play a sound to warn when the machines stopped pinging
A way to tell it not to halt the computer tonight without having to disable it
A way to change the rules without having to modify the script
If you want any of those, or anything else, give me a shout.
Metadata
Release files for marchanddesable 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| marchanddesable-0.2.tar.gz | 4.1 kB | Without provenance | Details for marchanddesable-0.2.tar.gz |
Release files / marchanddesable-0.2.tar.gz
| Download URL | marchanddesable-0.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72fa7f3ecf8f4c41f7151ec8d1eedd27302e8621dce2f373defc5166536d573b
|
|
BLAKE2b-256 checksum How to use checksums |
59530495ab0bd856a454bc8bdb291675062da3daee41c8db0498dac45845e546
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for marchanddesable 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.