added more portable (perl) hostname fetching to pass to the C code, updated docs
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Mar 2007 22:04:57 +0000 (22:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Mar 2007 22:04:57 +0000 (22:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7079 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/opensrf.xml.example
OpenSRF/bin/osrf_ctl.sh

index bd4dd50..af81517 100644 (file)
@@ -627,7 +627,12 @@ Example opensrf config file for OpenILS
     </default>
 
     <hosts>
-        <localhost> <!-- must match "hostname -f" of the hosting machine -->
+
+        <localhost> 
+            <!-- ^-=- must match the fully qualified domain name of the host 
+               on Linux, this is usually the output of "hostname -f"
+            -->
+
             <activeapps>
                 <!-- services hosted on this machine -->
                 <appname>opensrf.settings</appname> 
index 02fb9a6..5be1533 100755 (executable)
@@ -134,8 +134,9 @@ function stop_perl {
 }
 
 function start_c {
-       do_action "start" $PID_OSRF_C "OpenSRF C";
-       opensrf-c $(hostname -f) $OPT_C_CONFIG opensrf;
+    host=$(perl -MNet::Domain=hostfqdn -e 'print hostfqdn()')
+       do_action "start" $PID_OSRF_C "OpenSRF C (host=$host)";
+       opensrf-c $host $OPT_C_CONFIG opensrf;
        pid=$(ps ax | grep "OpenSRF System-C" | grep -v grep | awk '{print $1}')
        echo $pid > "$PID_OSRF_C";
        return 0;