Hello!
s6 is great, but its existing interface can feel a bit unwieldy for
me, and I need to re-read the docs frequently. So I've made a command
line frontend with helper functions for it, called essex:
on GitHub:
https://github.com/AndydeCleyre/essex
video demo:
https://streamable.com/oek3d
on PyPI:
https://pypi.org/project/essex/
I hope someone else will also find it useful.
Here's an example runfile and loggerfile generated by the tool:
```
==> /home/andy/svcs/memdb/run <==
#!/bin/execlineb -P
fdmove -c 2 1 # Send stderr to stdout
foreground { redirfd -w 1 run.md5 md5sum run } # Generate hashfile,
to detect changes since launch
s6-setuidgid redis # Run as this user
cd /var/lib/redis # Enter working directory
redis-server # Do the thing
==> /home/andy/svcs/memdb/log/run <==
#!/bin/execlineb -P
foreground { redirfd -w 1 run.md5 md5sum run } # Generate hashfile,
to detect changes since launch
s6-log # Receive process output
T # Start each line with
an ISO 8601 timestamp
s4194304 # Archive log when it
gets this big (bytes)
S41943040 # Purge oldest
archived logs when the archive gets this big (bytes)
/home/andy/svcs-logs/memdb # Store logs here
```
It lends itself to aliases like:
`alias sussex="sudo essex -d /var/svcs"`
Thanks of course to skarnet for the excellent software that does all
the work, in a sane way, as well as the frequent immediate support and
feedback.
Essex does not (at least, not yet) offer any conveniences for
interdependence of processes, but for my cases thus far the usual
retry behavior is sufficient. I welcome advice on growing or otherwise
improving the project, if there's interest.
Please let me know if you try it! Feel free to submit issues, or reach
me on Telegram:
https://t.me/andykluger , as I'm awful at noticing
emails from real humans.
Received on Mon Jan 28 2019 - 02:43:11 UTC