Example scripts
I think it would be really cool, expecially for casual" users like myself, if you had a set of control scripts for a starting point for creating the external scripts.
Obviously this is not my forté, but a fun thing to do might be to make a daemonproxy based perp (similar commands), so maybe
- derpctl
- derphup
- derpls
- derpok
- derpstat
I might try my hand at this, but I'm honestly not really sure where to start; I guess if I were using perl I'd want to have an event loop watching for events on STDIN and on some domain socket for external control? I'll let you know if I come up with anything.
Oh also, I'd understand if you don't think that stuff like this should be bundled with daemonproxy, but at least linking to examples would be nice.
I would love to bundle a simple one in the doc directory. Event based listening to a unix socket is also how I'd do it.
At some point I want to write something complete like perp and publish on cpan. I'll also be writing a module for rapidapp to run background jobs some day soon.
Oh, and I just added an example which performs an orderly shutdown of all services.
Another idea for an example script. Maybe this is too far, but it would be sorta neat if daemonproxy read a dir like runit and the original djb tools did. Might be too much work, but at least supporting ./run and ./log/run would go a long way.
I'm going to write a separate project for this, and I've started it at https://github.com/silverdirk/desd/
It's mostly a blank slate so far. Feel free to contribute ideas.
That tool will use Daemonproxy::Protocol (from this repo) to talk to daemonproxy. I haven't made much progress on the lib lately because I'm having trouble imagining all the use cases the library should handle. By making an actual end-product, it will help me see what problems this library should solve.