Simple user space init system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Stephen Cochrane e011fe2bc5 Small fix to run script, to force work dir to be the same as the caller's wd 2 years ago
src Small fix to run script, to force work dir to be the same as the caller's wd 2 years ago
.build.yml Small refactor after init 2 years ago
.dev Bug fixes, added two new commands, edit and new 2 years ago
.gitignore Updated gitignore 2 years ago
LICENSE Updated license 2 years ago
README.md Updated license 2 years ago
pom.xml Started working on docs 2 years ago
run.sh Small fix to run script, to force work dir to be the same as the caller's wd 2 years ago

README.md

start.d

Simple user space, init system, pronounced started

Installing

First we need to get the distribution (start.d-<VERSION>-dist.zip), we get this by running

$ mvn package # Distribution will be placed in target/

or, by downloading the latest stable distribution.

Next, we unpack the distribution,

$ unzip start.d-<VERSION>-dist.zip -d /tmp

Next run the install script in the unzipped directory, as root.

$ ./install # This should be ran as root

Uninstalling

$ ./install remove # This should be ran as root

You can, also play around with start.d before installing if you like (you can run ./start.d.sh -h and go from there)

Building

$ mvn package

Usage

Simply run:

$ start.d -h

This prints something similar too

  start.d ~ The user space init system

   Usage: $ start.d [OPTIONS] COMMAND SERVICE

    Options
     -h --help                              Shows this message
     -w --work-dir /PATH/TO/WORKING/DIR     Specify the working directory
     -p --port PORT                         Specify the port to communicate on
     --create-wd                            Creates any missing parent directories in the working directory
     --create-wd-only                       Creates any missing parent directories in the working directory, then exits
     --daemon                               Enters daemon mode, starting up all services found in enable, and monitors for changes etc
     --status                               Prints the status for all current services
     --pool-size                            Specify the size of the thread pools (applied to both service pool and internal task pool)

    Commands
     status         Get information about a service
     enable         Start a service when the daemon is finished starting up
     disable        Remove a service from the list of services to be started when the daemon is finished starting up
     start          Start a service
     stop           Stop a service
     restart        Restart a service
     kill           Forcefully stop a service
     add            Read a service config from stdin, saving it
     edit           Opens service in the system $EDITOR
     new            Opens a new sample service in the system $EDITOR, similar to ADD and EDIT
     delete         Deletes the service config, and killing the service if its running

  Written with <3 by Stephen Cochrane

Licencse

License: