x 36c87fcd9a contrib/runit-init: startup scripts for taud, darkirc, ircd 3 лет назад
..
darkirc 36c87fcd9a contrib/runit-init: startup scripts for taud, darkirc, ircd 3 лет назад
ircd 36c87fcd9a contrib/runit-init: startup scripts for taud, darkirc, ircd 3 лет назад
taud 36c87fcd9a contrib/runit-init: startup scripts for taud, darkirc, ircd 3 лет назад
README.md 36c87fcd9a contrib/runit-init: startup scripts for taud, darkirc, ircd 3 лет назад

README.md

Startup services for runit.

Configure Per-User Services and Logging

Create the service dirs:

    $ mkdir ~/.local/service/
    $ mkdir ~/.local/sv/

~/.local/sv/ will contain our services which we symlink into ~/.local/sv/ to activate.

In your ~/.bashrc or ~/.zshrc, add this line:

    $ export SVDIR=~/.local/sv/

Then as root, make sure you add this to /root/.(bash|zsh)rc:

    unset SVDIR

Now follow these guides:

To view the logs, open another terminal, switch to root and run the command below. Leave this window open so we can view the daemon logs.

    # svlogtail daemon

Finally make sure your user level service is running:

    # sv status runsvdir-narodnik
    run: runsvdir-narodnik: (pid 25140) 483s

Copy Services

Copy the directories here over to ~/.local/sv/:

    $ cp -r darkirc/ ircd/ taud/ ~/.local/sv/

Activate them by symlinking them into ~/.local/service/. We need the full path.

    $ cd ~/.local/service/
    $ ln -s /home/USER/.local/sv/darkirc/ .
    $ ln -s /home/USER/.local/sv/ircd/ .
    $ ln -s /home/USER/.local/sv/taud/ .

Now check they are working fine:

    $ sv status darkirc

You should also view the log output in the window we opened earlier.

Short Explanation

Each directory contains an executable run script which launches the daemon. We must redirect STDERR to STDOUT to get error messages in the log output.

To enable the log output, we must provide the log/run script which contains the logger command. You can test logger output like this:

    $ vlogger -t darky -p daemon hello123