Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
blob: cfe194ab8ea97b1ea3585119dd92886ac467ded7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/perl -w
#*******************************************************************************
# Copyright (c) 2005, 2006 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# IBM Corporation - initial API and implementation
#*******************************************************************************
 
$port = "4075";
$helpFlag = "-h"; 
$dir = ".";
 
if (defined($ARGV[0]))
{	
	$port = $ARGV[0];
}


$isHelp = $helpFlag cmp $port; 
if ($isHelp == 0)
{
   print("command usage:\n");
   print("daemon.linux [<port> | <low port>-<high port>] [ <low server port>-<high server port>]\n");    
 0;
}
else
{
	$user=`whoami`; chomp($user); 
	$match = $user cmp "root";

	if ($match != 0)
	{
	    print("WARNING: To run the server daemon, you must have root authority\n");
	}

	$trace="false";
	if (defined($ENV{DSTORE_TRACING_ON}))
	{
		$trace = $ENV{DSTORE_TRACING_ON};
	}
	
	    $dir= $ENV{PWD};
	    $plugins_dir=$dir;
		
	    $ENV{A_PLUGIN_PATH}="$plugins_dir/";
    
    
	    $oldClasspath = $ENV{CLASSPATH};
	    

		$ENV{CLASSPATH}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar";
		if (defined ($oldClasspath))
		{
		  $ENV{CLASSPATH}="$ENV{CLASSPATH}:$oldClasspath";
		}

		if (defined($ARGV[1]))
		{
			system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port $ARGV[1]");
		}
		else
		{
		    system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port");
		}

}

Back to the top