Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example scripts #47

Open
frioux opened this issue Jun 26, 2014 · 5 comments
Open

Example scripts #47

frioux opened this issue Jun 26, 2014 · 5 comments

Comments

@frioux
Copy link
Contributor

frioux commented Jun 26, 2014

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.

@nrdvana
Copy link
Owner

nrdvana commented Jun 26, 2014

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.

@nrdvana
Copy link
Owner

nrdvana commented Jun 26, 2014

Oh, and I just added an example which performs an orderly shutdown of all services.

nrdvana added a commit that referenced this issue Jul 1, 2014
…onproxy

This script reads a yaml config file and then interacts with daemonproxy
on stdin/stdout to make daemonproxy's state match the config.  If the config
file has not changed from the previous run, it should not alter daemonproxy's
state in any way (except to decrement the SIGHUP count)

This code is incomplete, and lightly commented.

refs #45, refs #47, refs #49
@frioux
Copy link
Contributor Author

frioux commented Sep 12, 2014

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.

nrdvana added a commit that referenced this issue Sep 15, 2014
Also fixed syntax errors in Daemonproxy::Protocol revealed by test

refs #47
@nrdvana
Copy link
Owner

nrdvana commented Nov 14, 2014

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.

@nrdvana
Copy link
Owner

nrdvana commented Nov 14, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants