1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 23:17:37 +00:00

Startup scripts now create the data directory if it doesn't exist.

This commit is contained in:
Samuel Lai 2012-08-19 12:27:45 +10:00
parent 651f97255e
commit c1ae870e3d
3 changed files with 15 additions and 2 deletions

View File

@ -62,7 +62,7 @@ If Stackdump will be running in a completely offline environment, it is recommen
* download the "RSS feed":http://stackexchange.com/feeds/sites to a file
* for each site you will be importing, work out the __site key__ and download the logo by substituting the site key into this URL: @http://sstatic.net/site_key/img/icon-48.png@ where *site_key* is the site key. The site key is generally the bit in the URL before .stackexchange.com, or just the domain without the TLD, e.g. for the Salesforce StackExchange at http://salesforce.stackexchange.com, it is just __salesforce__, while for Server Fault at http://serverfault.com, it is __serverfault__.
The RSS feed file should be copied to the file @stackdump_dir/data/sites@, and the logos should be copied to the @stackdump_dir/python/media/images/logos@ directory and named with the site key and file type extension, e.g. @serverfault.png@.
The RSS feed file should be copied to the file @stackdump_dir/data/sites@ (create the @data@ directory if it doesn't exist), and the logos should be copied to the @stackdump_dir/python/media/images/logos@ directory and named with the site key and file type extension, e.g. @serverfault.png@.
h3. Import sites

View File

@ -10,9 +10,16 @@ fi
if [ -z "`which $JAVA_CMD 2>/dev/null`" ]
then
echo "Java not found. Try specifying path in a file named JAVA_CMD in the script dir."
echo "Java not found. Try specifying the path to the Java executable in a file named"
echo "JAVA_CMD in this script's directory."
exit 1
fi
# ensure the data directory exists
if [ ! -e "$SCRIPT_DIR/data" ]
then
mkdir "$SCRIPT_DIR/data"
fi
cd $SCRIPT_DIR/java/solr/server
$JAVA_CMD -server -Xmx2048M -XX:MaxPermSize=512M -jar start.jar

View File

@ -2,4 +2,10 @@
SCRIPT_DIR=`dirname $0`
# ensure the data directory exists
if [ ! -e "$SCRIPT_DIR/data" ]
then
mkdir "$SCRIPT_DIR/data"
fi
$SCRIPT_DIR/start_python.sh $SCRIPT_DIR/python/src/stackdump/app.py