#/bin/bash

stop(){
      
        docker  stop  $(docker ps -a|grep  "longvideoapi:latest"|grep -v grep|awk  '{print $1}')
}
start(){
	cid=`docker ps   -a |grep  "longvideoapi:latest"|grep -v grep|awk  '{print $1}'`
       docker  start $cid
}



  case "$1" in
   'start')
      start
      ;;
   'stop')
     stop
     ;;
   'restart')
     stop
     start
     ;;
  *)
     echo "Usage: $0 {start|stop|restart}"
     exit 1
;;
esac
