SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. #
  3. # Start/stop voice-agent
  4. #
  5.  
  6. DAEMON=/userdata/voice-agent/rockchip_start.sh
  7. PIDFILE=/var/run/voice-agent.pid
  8.  
  9. [ -x $DAEMON ] || exit 0
  10.  
  11. case "$1" in
  12.   start)
  13.     if [ -f "$PIDFILE" ]; then
  14.         echo "Already running"
  15.         exit 1
  16.     fi
  17.     echo "Starting voice-agent..."
  18.     start-stop-daemon -S -x "$DAEMON" -p "$PIDFILE" -b
  19.     ;;
  20.   stop)
  21.     echo "Stopping voice-agent..."
  22.     start-stop-daemon -K -p "$PIDFILE" -o
  23.     ;;
  24.   restart)
  25.     "$0" stop
  26.     sleep 1
  27.     "$0" start
  28.     ;;
  29.   *)
  30.     echo "Usage: $0 {start|stop|restart}"
  31.     exit 1
  32. esac
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top