Commit 5e460723 by Avi Junowicz

automatic update script for OTP

parent 02315d9f
Showing with 32 additions and 0 deletions
#!/bin/bash
DATE=`date '+%y%m%d'`
cd /root/chicago
wget http://www.transitchicago.com/downloads/sch_data/google_transit.zip
wget https://s3.amazonaws.com/metro-extracts.mapzen.com/chicago_illinois.osm.pbf
java -Xmx8G -jar /root/Transport/OpenTripPlanner/otp-core/target/otp.jar --build /root/chicago --transitIndex
cd /var/otp/graphs
mv Graph.obj Graph.obj_$DATE
gzip Graph.obj_$DATE
cp -p /root/chicago/Graph.obj .
PID=`pgrep -f otp.jar`
kill -9 $PID
if [ $? -eq 0 ]
then
echo "OTP stopped successfully"
echo $?
else
echo "Failed to stop OTP"
fi
cd /root/Transport/OpenTripPlanner
rm nohup.out
nohup java -Xmx4G -jar otp-core/target/otp.jar --server &
cd /root/chicago
mkdir $DATE
mv *.zip $DATE
mv *.pbf $DATE
mv *.obj $DATE
cd $DATE
gzip *.obj
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment