Skip to content
Snippets Groups Projects
Commit deabd960 authored by anttil's avatar anttil
Browse files

BIS-139 / SP-510: Auto-symlink startup script

SVN: 28397
parent 4531d28b
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
pushd . > /dev/null
cd `dirname $0`
deleted="false"
java -cp "lib/datastore_server.jar:lib/*" ch.systemsx.cisd.openbis.dss.generic.shared.utils.DssPropertyParametersUtil 2>/dev/null|while read line
do
if [ "$deleted" = "false" ];
then
rm -f lib/autolink-*.jar;
deleted="true";
fi;
dropbox=`echo $line|cut -d" " -f1`;
folder=`echo $line|cut -d" " -f2`;
if [ -d ${folder}/lib ];
then
for jar in `ls ${folder}/lib/*.jar`;
do
echo "# ln -s $jar `pwd`/lib/autolink-${dropbox}-`basename $jar`";
ln -s $jar `pwd`/lib/autolink-${dropbox}-`basename $jar`;
done;
fi;
done
popd > /dev/null
......@@ -161,6 +161,7 @@ case "$command" in
echo -n "Starting Data Store Server "
rotateLogFiles $LOGFILE $MAXLOGS
./autosymlink.sh
shift 1
${CMD} "$@" > $STARTUPLOG 2>&1 & echo $! > $PIDFILE
if [ $? -eq 0 ]; then
......
......@@ -17,6 +17,7 @@
package ch.systemsx.cisd.openbis.dss.generic.shared.utils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
......@@ -257,4 +258,29 @@ public class DssPropertyParametersUtil
ConfigurationFailureException e = new ConfigurationFailureException(template.createText());
return e;
}
public static void main(String[] args)
{
ExtendedProperties properties =
DssPropertyParametersUtil
.loadProperties(DssPropertyParametersUtil.SERVICE_PROPERTIES_FILE);
CorePluginsUtils.addCorePluginsProperties(properties, ScannerType.DSS);
ExtendedProperties serviceProperties =
DssPropertyParametersUtil.extendProperties(properties);
CorePluginsInjector injector =
new CorePluginsInjector(ScannerType.DSS, DssPluginType.values());
Map<String, File> pluginFolders =
injector.injectCorePlugins(serviceProperties);
try
{
for (String key : pluginFolders.keySet())
{
System.out.println(key + " " + pluginFolders.get(key).getCanonicalPath());
}
} catch (IOException ex)
{
ex.printStackTrace();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment