supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Robin Bowes <robin-lists@robinbowes.com>
To: supervision@list.skarnet.org
Subject: Re: configurable path to ./supervise/
Date: Fri, 18 Apr 2008 22:41:41 +0100	[thread overview]
Message-ID: <48091595.1040101@robinbowes.com> (raw)
In-Reply-To: <43362.24.8.235.144.1208550740.squirrel@www.xagasoft.com>

Mike wrote:
> 
> I just tested it, "into an existing directory" is right.
> 
> I created this service:
> 
> test
>   supervise -> /var/run/sv-test
>   run
>   log
>     supervise -> /var/run/sv-test-log
>     run
>     main -> /var/log/sv-test
> 
> I did not create the directories /var/run/sv-test or /var/run/sv-test-log,
> runit did that for me.  I did create /var/log/sv-test, and set permissions
> on it.
> 
> This works just fine, and is actually pretty cool.
> 
> Also, I tried this same thing with making test/log/supervise point to
> /var/run/sv-test/log, it also worked.  makes it a little neater...

OK, so let me get my head round this...

The aim is to keep config files in /etc, but state information 
(supervise) in /var/ somewhere (and logs in /var/log/ somewhere)

Assuming I have the following dirs already created:

/etc/sv
/var/run/sv
/var/log/sv

To create a new service "test" with a log, I can do this:

mkdir -p /etc/sv/test/log
mkdir -p /var/log/sv/test
ln -s ../../../var/run/sv/test /etc/sv/test/supervise
ln -s ../../../../var/run/sv/test/log/ /etc/sv/test/log/supervise
ln -s ../../../../var/log/sv/test /etc/sv/test/log/main

I use a generic log run file, so I can symlink that:

ln -s ../../scripts/generic-log-run /etc/sv/test/log/run

Then, create the service run file, and symlink /etc/sv/test into 
/var/service.

ln -s ../../etc/sv/test /var/service

Hey, cool - that works!

Nice one!

R.


  reply	other threads:[~2008-04-18 21:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18 20:32 Mike
2008-04-18 21:41 ` Robin Bowes [this message]
2008-04-18 22:11   ` Alex Efros
2008-04-18 22:21     ` Charlie Brady
2008-04-18 22:30       ` Alex Efros
2008-04-18 22:48         ` Mike
2008-04-18 23:00         ` Charlie Brady
2008-04-18 23:39     ` Robin Bowes
2008-04-19 13:25       ` /service vs /var/service vs /etc/service Gerrit Pape
2008-04-19 13:35         ` Robin Bowes
2008-04-19 13:54           ` Gerrit Pape
2008-04-19 14:13             ` Robin Bowes
2008-04-19 17:40               ` Gerrit Pape
     [not found]             ` <283B46AC657546A883A45437109FE51D@home.internal>
2008-04-22 16:24               ` rehan khan
  -- strict thread matches above, loose matches on Subject: below --
2008-04-18 19:06 configurable path to ./supervise/ Alex Efros
2008-04-18 19:10 ` Charlie Brady
2008-04-18 19:12   ` Alex Efros
2008-04-18 19:27     ` Charlie Brady
2008-04-18 19:53       ` Gerrit Pape
2008-04-18 20:17         ` Charlie Brady
2008-04-18 19:45 ` Andras Korn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48091595.1040101@robinbowes.com \
    --to=robin-lists@robinbowes.com \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).