if [ ! -z "$OPENSRFC" ]; then
echo "Starting OpenSRF-C...";
# localhost will need to be changed...
- "$BINDIR/opensrf-c" localhost "$ETCDIR//opensrf_core.xml" "opensrf"
+ "$BINDIR/opensrf-c" $(hostname -f) "$ETCDIR//opensrf_core.xml" "opensrf"
echo "OpenSRF-C started OK";
fi
}
i = 0;
while( (appname = osrfStringArrayGetString(arr, i++)) ) {
- char* libfile = osrf_settings_host_value("/apps/%s/implementation", appname);
- info_handler("Launching application %s with implementation %s", appname, libfile);
+ char* lang = osrf_settings_host_value("/apps/%s/language", appname);
+
+ if(lang && !strcasecmp(lang,"c")) {
+
+ char* libfile = osrf_settings_host_value("/apps/%s/implementation", appname);
+
+ if(! (appname && libfile) ) {
+ warning_handler("Missing appname / libfile in settings config");
+ continue;
+ }
+
+ info_handler("Launching application %s with implementation %s", appname, libfile);
+
+ int pid;
+
+ if( (pid = fork()) ) {
+ // storage pid in local table for re-launching dead children...
+ info_handler("Launched application child %d", pid);
- if(! (appname && libfile) ) {
- warning_handler("Missing appname / libfile in settings config");
- continue;
- }
-
- int pid;
-
- if( (pid = fork()) ) {
- // storage pid in local table for re-launching dead children...
- info_handler("Launched application child %d", pid);
-
- } else {
+ } else {
+
+ fprintf(stderr, " * Running application %s\n", appname);
+ if( osrfAppRegisterApplication( appname, libfile ) == 0 )
+ osrf_prefork_run(appname);
- fprintf(stderr, " * Running application %s\n", appname);
- if( osrfAppRegisterApplication( appname, libfile ) == 0 )
- osrf_prefork_run(appname);
-
- debug_handler("Server exiting for app %s and library %s", appname, libfile );
- exit(0);
- }
- }
+ debug_handler("Server exiting for app %s and library %s", appname, libfile );
+ exit(0);
+ }
+ } // language == c
+ }
}
/** daemonize me **/
for my $app (@$apps) {
# verify we are a settings server and launch
- if( $app eq "opensrf.settings" ) {
+ if( $app eq "opensrf.settings" and
+ $client->config_value("apps","opensrf.settings", "language") =~ /perl/i ) {
+
$are_settings_server = 1;
$self->launch_settings();
sleep 1;
sub launch_unix {
my( $self, $apps ) = @_;
+ my $client = OpenSRF::Utils::SettingsClient->new();
+
foreach my $app ( @$apps ) {
+
next unless $app;
+ my $lang = $client->config_value( "apps", $app, "language");
- if( $app eq "opensrf.settings" ) { next; }
+ next unless $lang =~ /perl/i;
+ next unless $app ne "opensrf.settings";
_log( " * Starting UnixServer for $app..." );