From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1003 Path: news.gmane.org!not-for-mail From: Vincent Danen Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: /etc/runit vs /etc/sv vs /usr/share (Debian) Date: Wed, 1 Feb 2006 10:15:45 -0700 Organization: Annvix Message-ID: <20060201171545.GZ743@annvix.org> References: <20060201135409.GA10941@dusk.harfang.homelinux.org> <20060201142806.25684.qmail@4ca2ca9055810d.315fe32.mid.smarden.org> <20060201145445.GA12654@dusk.harfang.homelinux.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KVD286J60HPqoCnF" X-Trace: sea.gmane.org 1138814248 21042 80.91.229.2 (1 Feb 2006 17:17:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2006 17:17:28 +0000 (UTC) Original-X-From: supervision-return-1239-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Feb 01 18:17:22 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1F4Lai-00035B-GH for gcsg-supervision@gmane.org; Wed, 01 Feb 2006 18:16:25 +0100 Original-Received: (qmail 8083 invoked by uid 76); 1 Feb 2006 17:16:45 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 8077 invoked from network); 1 Feb 2006 17:16:45 -0000 Original-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20060201145445.GA12654@dusk.harfang.homelinux.org> X-Mailer: Mutt 1.5.x/OS X 10.4.x X-PGP-Key: http://linsec.ca/vdanen.asc X-URL: http://annvix.org/ User-Agent: Mutt/1.5.10i X-SA-Exim-Connect-IP: 68.149.37.7 X-SA-Exim-Mail-From: vdanen@annvix.org X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on hades.annvix.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=6.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2 (built Sun, 09 Oct 2005 23:21:52 -0400) X-SA-Exim-Scanned: Yes (on hades.annvix.org) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1003 Archived-At: --KVD286J60HPqoCnF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Gilles [2006-02-01 15:54:45 +0100]: [...] > > After all it's just personal preference. I prefer to have the service's > > configuration (including run scripts) and logs all accessible through a > > single directory, now /etc/sv//. > >=20 >=20 > Definitely fine for "run" and "log/run", but do you really recommend havi= ng > the log files in there too? Those files can grow and eat a large amount > of the root partition's space! I thought a better place would be >=20 > /var/log/service/ >=20 > or with the newly proposed name >=20 > /var/log/sv/ For Annvix, which uses runit as init by default, we do things a bit different, but similar to the above. All packages, once they're installed create /var/service/foo and /var/service/foo/log with the appropriate run scripts in them. This is where they go, by default, and this isn't supervised. We have our own tool called srv that manages things like dependencies, starting and stopping services, etc. When we add a service (srv --add foo) it creates a symlink in /service; and /service is the directory tree that is actually supervised. To remove a service, just remove the symlink (well, srv --del foo is cleaner). Anyways, all of our logging scripts look similar to this: [vdanen@build SPECS]$ cat ../SOURCES/mdadm-log.run=20 #!/bin/execlineb # logging for the mdadm service /bin/foreground { /usr/bin/install -m 0700 -d -o logger -g logger /var/log/= service/mdadm } /bin/cd /var/log/service /sbin/chpst -u logger /sbin/svlogd -tt /var/log/service/mdadm So all of our logs go in /var/log/service/foo. I find this is much cleaner because /etc should be used for configuration files and while people can argue that a run script is actually a configuration file (we flag it as such in our rpm packages so that run scripts don't get overwritten if people make modifications to it), there is other stuff, as you mention, that doesn't belong in /etc... supervision state files, logs, and so forth. The same argument goes for /usr/share... great for templates, but I wouldn't run a service out of /usr... that's what /var is for. --=20 Annvix - Secure Linux Server: http://annvix.org/ "lynx -source http://linsec.ca/vdanen.asc | gpg --import" {FEE30AD4 : 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4} Wasting time like it was free... --KVD286J60HPqoCnF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFD4OzBLrxeMv7jCtQRAvtaAJ9lLFDdOZsp/hHHJfI/6gU3d2RhRACfR9QJ 3JpHGktOce6mYPaAAaWXxds= =Je2d -----END PGP SIGNATURE----- --KVD286J60HPqoCnF--