From a683108a10a90794eb4052cedf2fcb9dafb3b787 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 9 Dec 2014 04:46:40 +0000
Subject: [PATCH] HelloWorld: Add an example of how to get an IP address to
 bind to

also fix a few typos and reference to slapgrid
---
 software/helloworld/instance.cfg.in | 11 +++++------
 software/helloworld/software.cfg    |  2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/software/helloworld/instance.cfg.in b/software/helloworld/instance.cfg.in
index 411fe97c2..cc03c9191 100644
--- a/software/helloworld/instance.cfg.in
+++ b/software/helloworld/instance.cfg.in
@@ -24,7 +24,7 @@ offline = true
 # It will then authenticate to SlapOS Master and fetch the instance parameters.
 # The parameters are accessible from $${instance-parameter:configuration.name-of-parameter}
 # Always the same. Just copy/paste.
-# See docstring of slapos.cookbook:slapconfiguration for more informations.
+# See docstring of slapos.cookbook:slapconfiguration for more information.
 recipe = slapos.cookbook:slapconfiguration
 computer = $${slap_connection:computer_id}
 partition = $${slap_connection:partition_id}
@@ -65,11 +65,10 @@ log = $${:var}/log
 # This recipe will try to "exec" the command-line after separating parameters.
 recipe = slapos.cookbook:wrapper
 # Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile.
-command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}, it is $(date)." > $${directory:log}/log.log; sleep 1000000;'
-# Put this shell script in the "etc/service" directory. Every executable of this
-# repository will be started and monitored by supervisord. If one service
-# exits/crashes, it will trigger a "bang" and cause run of slapgrid for the
-# instance.
+command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}, it is $(date). If I were a TCP server, I would be listening on [$${instance-parameter:ipv6-random}] or $${instance-parameter:ipv4-random}" > $${directory:log}/log.log; sleep 1000000;'
+# Put this shell script in the "etc/service" directory. Each executable of this
+# repository will be started and monitored by supervisord. If a service
+# exits/crashes, it will trigger a "bang" and cause a re-run of the instance.
 wrapper-path = $${directory:service}/hello-world
 
 
diff --git a/software/helloworld/software.cfg b/software/helloworld/software.cfg
index 795d1a451..645d5a8c6 100644
--- a/software/helloworld/software.cfg
+++ b/software/helloworld/software.cfg
@@ -26,5 +26,5 @@ recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance.cfg.in
 output = ${buildout:directory}/instance.cfg
 # MD5 checksum can be skipped for development (easier to develop), but must be filled for production
-md5sum = ed94ac99ae1e596c0da5350da6ab6f52
+md5sum = 532d13c3aee4f0252181da39765317f0
 mode = 0644
-- 
2.30.9