uninstall_service.sh 519 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # Copyright: 2016-2018 ROS小课堂 www.corvin.cn
  3. # Author: corvin
  4. # Description: Uninstall voice_system.service.
  5. # History:
  6. # 20181129:initial this bash file.
  7. pid=`ps -ef|grep voice_bringup.launch|grep -v grep|awk '{print $2}'`
  8. if [ -n "$pid" ]
  9. then
  10. /usr/sbin/voice_system_stop
  11. fi
  12. sudo systemctl disable voice_system.service
  13. sudo rm /usr/sbin/voice_system_start
  14. sudo rm /usr/sbin/voice_system_stop
  15. sudo rm /usr/sbin/voice_system_restart
  16. sudo rm /lib/systemd/system/voice_system.service
  17. exit 0