voice_system_restart 392 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # Copyright: 2016-2018 ROS小课堂 www.corvin.cn
  3. # Author: corvin
  4. # Description: when restart voice system node, this bash file should
  5. # be executed.
  6. # History:
  7. # 20181129: initial this bash file.
  8. pid=`ps -ef|grep voice_bringup.launch|grep -v grep|awk '{print $2}'`
  9. if [ -n "$pid" ]
  10. then
  11. /usr/sbin/voice_system_stop
  12. sleep 3
  13. fi
  14. /usr/sbin/voice_system_start
  15. exit 0