You are not logged in.

#1 2011-05-06 10:17:59

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

ghoul - daemon manipulation tool

Earlier this morning, I was thinking about my last few projects, specifically cush and ncrast. They have a very limited audience as they fill niche needs. I decided, therefore, to do something which should appeal to anyone using daemons with a BSD-style init (like Arch uses).

ghoul is a powerful daemon manipulator. It can quickly start, stop, kill, and query daemons. It takes input on the command line in the format [modifier]daemon. The modifiers are as follows:

+ Start daemon if stopped, don't do anything if started.
- Stop daemon if started, don't do anything if stopped.
? Print daemon status.
% Send SIGKILL to service and clean up.

If you do not give it a modifier, it will start the daemon if it is stopped, and restart it if started.

You can manipulate as many daemons as you want, and you can manipulate the same one however many times you want. For example, the following command will stop dropbear, query its status, start dropbear, and then restart dropbear:

[chris@helios ~]$ sudo ghoul -dropbear ?dropbear +dropbear dropbear
Stopping daemon: dropbear
dropbear: Exists, and is stopped.
Starting daemon: dropbear
Restarting daemon: dropbear

ghoul is available on the AUR:

download

I'd appreciate any feedback you might have! smile

Last edited by neurolysis (2011-05-06 10:19:58)

Offline

#2 2011-05-06 17:43:48

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: ghoul - daemon manipulation tool

Just coz I read about it in the news - isn't the new /sbin/rc script doing stuff really similar to yours? (Seems like it essentially is a subset of your script.)

Offline

#3 2011-05-06 21:45:38

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: ghoul - daemon manipulation tool

Oh, er, maybe. I guess I should have read the news recently.

I'll take a look at it later and maybe commit some patches for improvements (if there are any to be made).

Offline

Board footer

Powered by FluxBB