4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
21 echo "Usage: $0 <work-dir>"
26 echo "Creating work dir $workdir"
32 echo "Copying dss-server-config.ini file"
33 cp $cwd/dss-server-config.ini $workdir/
38 echo "Copying plugin.ini file"
39 cp $cwd/plugin.ini $workdir/
45 cp ../../../../plugins/dssfile.py $workdir/
47 echo "Updating dss-server-config.ini"
48 pluginfile=$workdir/dssfile.py
49 escapepluginfile=$(echo $pluginfile | sed 's/\//\\\//g')
50 sed -i "s/PLUGIN_FILE/$escapepluginfile/g" $workdir/dss-server-config.ini
55 echo "Updating plugin.ini"
56 pluginconf=$workdir/plugin.ini
57 escapepluginconf=$(echo $pluginconf | sed 's/\//\\\//g')
58 sed -i "s/PLUGIN_CONF/$escapepluginconf/g" $workdir/dss-server-config.ini
61 escapefiles=$(echo $files | sed 's/\//\\\//g')
67 sed -i "s/DIR/$escapefiles/g" $workdir/plugin.ini
71 export PYTHONPATH=$cwd/../../../
73 exec python $cwd/../server/dss_main.py --config $workdir/dss-server-config.ini