<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,25 +23,25 @@ TARGET = $(addsuffix .beam, $(basename \
 
 UNAME = $(shell uname)
 
-build: master
+build: master config
 
 master: $(TARGET)
 
 clean:
-	- rm -Rf master/ebin/*.beam 
+	- rm -Rf master/ebin/*.beam
 	- rm -Rf pydisco/build
 	- rm -Rf pydisco/disco.egg-info
 	- rm -Rf node/build
 	- rm -Rf node/disco_node.egg-info
 
-install: install-master install-pydisco install-node 
- 
+install: install-master install-pydisco install-node
+
 install-master: install-config install-bin master
 	install -d $(TARGETDIR)/ebin
 	install -m 0755 $(TARGET) $(TARGETDIR)/ebin
 	install -m 0755 master/ebin/disco.app $(TARGETDIR)/ebin
 	install -m 0755 master/make-lighttpd-proxyconf.py $(TARGETDIR)
-	
+
 	cp -r master/www $(TARGETDIR)
 	chmod -R u=rwX,g=rX,o=rX $(TARGETDIR)/www
 
@@ -52,7 +52,7 @@ install-master: install-config install-bin master
 install-node: install-config install-bin master
 	install -d $(TARGETDIR)/ebin
 	install -m 0755 $(TARGET) $(TARGETDIR)/ebin
-	
+
 	(cd node; $(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(PREFIX))
 	$(if $(wildcard $(TARGETCFG)/lighttpd-worker.conf),\
 		$(info lighttpd-worker config already exists, skipping),\
@@ -75,3 +75,5 @@ install-config:
 $(EBIN)/%.beam: $(ESRC)/%.erl
 	$(CC) $(OPT) -o $(EBIN) $&lt;
 
+config:
+	cp -n conf/settings.py.template conf/settings.py || true</diff>
      <filename>Makefile</filename>
    </modified>
    <modified>
      <diff>@@ -11,9 +11,9 @@ class server(object):
         self.disco_settings = disco_settings
         self.host = socket.gethostname()
         self.port = port
-   
+
     def setid(self):
-        user = self.disco_settings['DISCO_USER'] 
+        user = self.disco_settings['DISCO_USER']
         if user != os.getenv('LOGNAME'):
             if os.getuid() != 0:
                 raise DiscoError(&quot;Only root can change DISCO_USER&quot;)
@@ -63,7 +63,7 @@ class server(object):
         if process.wait():
             raise DiscoError(&quot;Failed to start %s&quot; % self)
         yield '%s started' % self
-    
+
     def assert_status(self, status):
         if self._status != status:
             raise DiscoError(&quot;%s already %s&quot; % (self, self._status))
@@ -108,7 +108,7 @@ class lighttpd(server):
                     'DISCO_HTTP_PID': self.pid_file,
                     'DISCO_HTTP_PORT': str(self.port)})
         return env
-        
+
 class master(server):
     def __init__(self, disco_settings):
         super(master, self).__init__(disco_settings, disco_settings['DISCO_SCGI_PORT'])
@@ -140,7 +140,7 @@ class master(server):
         env = self.disco_settings.env
         env.update({'DISCO_MASTER_PID': self.pid_file})
         return env
-    
+
     @property
     def lighttpd(self):
         return lighttpd(self.disco_settings,
@@ -164,7 +164,7 @@ class master(server):
         if command in ('nodaemon', 'remsh'):
             return getattr(self, command)()
         return chain(getattr(self, command)(), self.lighttpd.send(command))
-    
+
     def __str__(self):
         return 'disco master'
 
@@ -172,7 +172,7 @@ class worker(server):
     def __init__(self, disco_settings):
         super(worker, self).__init__(disco_settings)
         self.setid()
-    
+
     @property
     def lighttpd(self):
         return lighttpd(self.disco_settings,
@@ -214,7 +214,7 @@ class test(object):
         yield 'searching for names in sys.path:\n%s' % sys.path
         from disco.test import DiscoTestRunner
         DiscoTestRunner(self.disco_settings).run(*names)
-    
+
 def main():
     DISCO_BIN  = os.path.dirname(os.path.realpath(__file__))
     DISCO_HOME = os.path.dirname(DISCO_BIN)
@@ -224,13 +224,10 @@ def main():
     if not os.path.exists(DISCO_CONF):
         DISCO_CONF = &quot;/etc/disco&quot;
 
-    # Don't include the directory where this disco.py script is located.
-    # Otherwise it'llt be confused with the disco package.
-    del sys.path[0]
-    sys.path.insert(0, DISCO_PATH)
+    sys.path.extend([DISCO_PATH, sys.path.pop(0)])
     from disco.settings import DiscoSettings
 
-    usage = &quot;&quot;&quot;            
+    usage = &quot;&quot;&quot;
             %prog [options] [master|worker] [start|stop|restart|status]
             %prog [options] master nodaemon
             %prog [options] debug [hostname]
@@ -258,7 +255,7 @@ def main():
             &quot;&quot;&quot;
             It seems that Disco is at {DISCO_HOME}
             Disco settings are at {0}
-            
+
             If this is not what you want, see the `--help` option
             &quot;&quot;&quot;.format(options.settings, **disco_settings)) # python2.6+
 
@@ -266,10 +263,10 @@ def main():
         for item in sorted(disco_settings.env.iteritems()):
             print('%s = %s' % (item))
         sys.exit(0)
-    
+
     argdict      = dict(enumerate(sys.argv))
     disco_object = globals()[argdict.pop(0, 'master')](disco_settings)
-    
+
     for name in disco_settings.must_exist:
         path = disco_settings[name]
         if not os.path.exists(path):</diff>
      <filename>bin/disco.py</filename>
    </modified>
    <modified>
      <diff>@@ -4,11 +4,7 @@ import os
 # DISCO_HOME will be guessed according to the path that disco is called from,
 # however its value can be overridden here for non-standard installations.
 
-# Enable the following line if you run Disco on a single machine,
-# or you have several masters running on the same server.
-DISCO_MASTER_PORT = 7000
-
-# Lighttpd for master and nodes runs on this port. 
+# Lighttpd for master and nodes runs on this port.
 # disco://host URIs are mapped to http://host:DISCO_PORT.
 DISCO_PORT = 8989
 </diff>
      <filename>conf/settings.py.template</filename>
    </modified>
    <modified>
      <diff>@@ -32,14 +32,6 @@ The new startup script makes it even easier to get up and running with a Disco c
 
 .. hint::
 
-   In order to use the `disco` command, you will first need to create a settings file, e.g.::
-
-        cp $DISCO_HOME/conf/settings.py.template $DISCO_HOME/conf/settings.py
-
-   Copying the default configuration should just work as a starting point for most users.
-
-.. hint::
-
    The documentation assumes that the executable ``$DISCO_HOME/bin/disco`` is on your system path.
    If it is not on your path, you can add it::
 </diff>
      <filename>doc/man/disco.rst</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 
 Disco settings
 ==============
- 
+
         *DISCO_DEBUG*
                 Sets the debugging level for Disco.
                 Default is 1.
@@ -31,10 +31,6 @@ Disco settings
                 The hostname of the master.
                 Default obtained using ``socket.gethostname()``.
 
-        *DISCO_MASTER_PORT*
-                The port the master uses for `HTTP` communication.
-                Default comes from ``DISCO_PORT``.
-
         *DISCO_NAME*
                 A unique name for the Disco cluster.
                 Default obtained using ``'disco_%s' % DISCO_SCGI_PORT``.</diff>
      <filename>doc/man/settings.rst</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>conf/settings.py</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>8e2fa1cca68b9afd7ed0b0ef9fabc29a36340283</id>
    </parent>
  </parents>
  <author>
    <name>Jared Flatow</name>
    <email>jflatow@gmail.com</email>
  </author>
  <url>http://github.com/tuulos/disco/commit/fa200f077f2dda7f9c28d1d74e8b0708ded19869</url>
  <id>fa200f077f2dda7f9c28d1d74e8b0708ded19869</id>
  <committed-date>2009-09-08T17:09:35-07:00</committed-date>
  <authored-date>2009-09-08T17:09:35-07:00</authored-date>
  <message>settings.py installed instead of VCed, documentation reflects changes in startup script</message>
  <tree>18c85e7f17503a61f1d22fec3ecd40809a972db5</tree>
  <committer>
    <name>Jared Flatow</name>
    <email>jflatow@gmail.com</email>
  </committer>
</commit>
