1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #!/bin/sh
- NAME=sensorycancel
- PIDFILE=$NAME.pid
- stopsim()
- {
- if [ -f $PIDFILE ]
- then
- running=`ps aux | grep $NAME | grep $(cat $PIDFILE) -c`
- if [ $running -eq 0 ]
- then
- echo Simulation not running
- else
- echo Killing Simulation
- kill $(cat $PIDFILE)
- echo stoped Simulation
- fi
- rm $PIDFILE
- fi
- true
- }
- stopsim
- #nice -10 ./v4learn --LoadForwardWeights
- #nice -10 ./v4learn --LoadV4Weights
-
- if [ $# -gt 0 ] && [ $1 = "stop" ]
- then exit 0
- fi
- if [ -f nohup.out ]
- then
- echo remove nohup.out
- rm nohup.out
- fi
- nohup nice -10 ./$NAME $* &
- echo $! > $PIDFILE
- echo started simulation with parameters: $*
|