Predictionio deployment script
Cd
Dt=date'+% Y-%m-%d% HRV% MVA% S'
Echo $dt 'start to run' > > whk.log
PATH=$PATH://PredictionIO-0.12.0-incubating/bin; export PATH
Pio train > > whk.log 2 > & 1
Temp=netstat-anp 2 > / dev/null | grep 4040 | awk'{print $7}'| sed's / [amurz\ /] / / g'
If ["$temp" = ""]; then
Echo "no find the thread" > > whk.log
Else
Echo "kill the thread:$temp" > > whk.log
Kill-9$ temp
Fi
Pio deploy > > whk.log 2 > & 1
Echo 'finish' > > whk.log