1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00
cdt/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/daemon.unix
David Dykstal 11e2a5c6da updating server runtime scripts to correct package names
adding source and SDK builds
pulling server scripts from correct directory during build
2006-04-21 21:42:15 +00:00

42 lines
789 B
Perl

#!/usr/bin/perl
if (defined($ARGV[0]))
{
$port = $ARGV[0];
}
else
{
$port = "4035";
}
#$user = $ENV{USER};
$trace = $ENV{DSTORE_TRACING_ON};
$user=`whoami`; chomp($user);
$match = $user cmp "root";
if ($match != 0)
{
print("To run the server daemon, you must be root\n");
0;
}
else
{
$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:$oldClasspath";
system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port");
$ENV{CLASSPATH}=$oldClasspath;
}