[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: FAQ on wiki
From: |
Richard Levitte - VMS Whacker |
Subject: |
Re: [Monotone-devel] Re: FAQ on wiki |
Date: |
Thu, 13 Jul 2006 11:04:10 +0200 (CEST) |
In message <address@hidden> on Thu, 13 Jul 2006 01:03:04 -0700, Nathaniel Smith
<address@hidden> said:
njs> On Thu, Jul 13, 2006 at 09:47:57AM +0200, Richard Levitte - VMS Whacker
wrote:
njs> > Do you want it done by crontab or through note_netsync_end()?
njs>
njs> Crontab, I'd think, or even a 'while sleep 600; ...' script run under
njs> daemontools supervision :-). (This is how the CIA script works now,
njs> to avoid crontab obnoxiousness.) Rather not couple the server and
njs> website that closely...
OK, here's what I use for some of my sites (it's a template, just
replace PROJECTNAME, SERVERNAME and BRANCHNAME with sensible strings
and change the paths that bother you):
-------------------- snip --------------------
#! /bin/sh
NAME=PROJECTNAME
SERVER=SERVERNAME
BRANCH=BRANCHNAME
CURRENTHOST=`hostname`
STORE=/var/lib/mtn-$NAME
WWWDIR=/var/www/$NAME
set -x
mkdir /var/run/$NAME.mtnlock && \
( /usr/bin/mtn \
--db=$STORE/mtn-mirror \
--keydir=$STORE/keys \
--rcfile=$STORE/conf/monotonerc \
--key='address@hidden' \
--ticker=dot \
pull $SERVER '$BRANCH*'
( cd $WWWDIR; /usr/bin/mtn update; if [ -f Makefile ]; then make; fi )
rmdir /var/run/$NAME.mtnlock )
-------------------- snip --------------------
You have to initiate once with the following (uhmmm, from memory):
mkdir /var/lib/mtn-PROJECTNAME
mkdir /var/lib/mtn-PROJECTNAME/keys
mkdir /var/lib/mtn-PROJECTNAME/conf
/usr/bin/mtn db init --db=/var/lib/mtn-PROJECTNAME/mtn-mirror
/usr/bin/mtn genkey \
--db=/var/lib/mtn-PROJECTNAME/mtn-mirror \
--keydir=/var/lib/mtn-PROJECTNAME/keys \
address@hidden
Create /var/lib/mtn-PROJECTNAME/conf/monotonerc with the following as
a template:
-------------------- snip --------------------
function get_passphrase (keypair_id)
if (keypair_id == "address@hidden")
then
return "PASSWORD"
end
return false
end
-------------------- snip --------------------
That should cover it, IIRC. Note that I created that templace script
*after* I set up my last site pump, based on the script I made for
that pump, so it's untested.
Cheers,
Richard
--
Richard Levitte address@hidden
http://richard.levitte.org/
"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
-- C.S. Lewis
- Re: FAQ on wiki (was Re: [Monotone-devel] Re: Dumb Question), (continued)
- Re: FAQ on wiki (was Re: [Monotone-devel] Re: Dumb Question), Nathaniel Smith, 2006/07/13
- [Monotone-devel] Re: FAQ on wiki, Richard Levitte - VMS Whacker, 2006/07/13
- Re: [Monotone-devel] Re: FAQ on wiki, Nathaniel Smith, 2006/07/13
- [Monotone-devel] Triggers (was: Re: FAQ on wiki), Koen Kooi, 2006/07/13
- Re: [Monotone-devel] Triggers (was: Re: FAQ on wiki), Daniel Carosone, 2006/07/13
- Re: [Monotone-devel] Triggers (was: Re: FAQ on wiki), oxygene, 2006/07/13
- Re: [Monotone-devel] Triggers (was: Re: FAQ on wiki), Nathaniel Smith, 2006/07/13
- [Monotone-devel] Re: Triggers, Koen Kooi, 2006/07/13
- Re: [Monotone-devel] Re: Triggers, Nathaniel Smith, 2006/07/13
- Re: [Monotone-devel] Re: Triggers, Alex Queiroz, 2006/07/13
- Re: [Monotone-devel] Re: FAQ on wiki,
Richard Levitte - VMS Whacker <=
- Re: [Monotone-devel] Re: FAQ on wiki, Matthew A. Nicholson, 2006/07/13
- Re: [Monotone-devel] Re: FAQ on wiki, Richard Levitte - VMS Whacker, 2006/07/13
- Re: [Monotone-devel] Re: FAQ on wiki, Matthew A. Nicholson, 2006/07/13
- Re: [Monotone-devel] Re: Dumb Question, Nathaniel Smith, 2006/07/12
- [Monotone-devel] Re: Dumb Question, Steven E. Harris, 2006/07/13
- Re: [Monotone-devel] Re: Dumb Question, Timothy Brownawell, 2006/07/13
- [Monotone-devel] Re: Dumb Question, Steven E. Harris, 2006/07/13
- Re: [Monotone-devel] Re: Dumb Question, Nathaniel Smith, 2006/07/13