This is just a little deal to generate scripts for installing things as daemons in *nix and Windows.

Usage

I wouldn’t.

If you’re brave, go for it, but "highly volatile" probably sums things up.

Basically you create a menu, and add Unix/Windows commands for the menu options, one for start and one for stop, and then whatever else you want (it does a plain old text menu if called without arguments), and the daemon script that Daevil generates and hooks into the system calls the appropriate option at the appropriate time.

Features

The "features" are that it has resolvers that use md5 hashes to download things upon first run. Basically a most generic bootstrapper, using very simple and highly available bash or cmd.exe/powershell v1 commands.

Also it creates users. Yeah. The script that’s generated, called install.bat or install.sh, will also optionally create (and remove, in remove.sh/bat) a user for the daemon.

So, real generic downloader/verifier and service installer/remover for *nix and Windows apps wanting to run at boot and whatnot, as services versus applications, per se, is what this is for.

Example

MultiOSMenu menu = new MultiOSMenu("Test Menu");

menu.fileName.set("menu");

menu.addOption("start", "Starts the thing")
        .command(OSType.WINDOWS, "echo start " + OSType.WINDOWS)
        .command(OSType.NIX_DARWINISH, "echo start " + OSType.NIX_DARWINISH)
        .command(OSType.NIX, "echo start " + OSType.NIX);

menu.addOption("stop", "Stops the thing")
        .command(OSType.WINDOWS, "echo stop " + OSType.WINDOWS)
        .command(OSType.NIX_DARWINISH, "echo stop " + OSType.NIX_DARWINISH)
        .command(OSType.NIX, "echo stop " + OSType.NIX);

Path resourcesTarget = Paths.get(workDir.toString() + "/multiosmenu");

menu.generate(resourcesTarget).forEach(Daevil.log::info);

Something like that, though it’ll Shirley change.

Building

Running the build

Run ./gradlew

Testing

For the Windows testing you’ll need wine and powershell v1 and there’s no cygwin stuff so I guess you can only run all the tests on *nix systems at the moment.