Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Start/stop voice-agent
- #
- DAEMON=/userdata/voice-agent/rockchip_start.sh
- PIDFILE=/var/run/voice-agent.pid
- [ -x $DAEMON ] || exit 0
- case "$1" in
- start)
- if [ -f "$PIDFILE" ]; then
- echo "Already running"
- exit 1
- fi
- echo "Starting voice-agent..."
- start-stop-daemon -S -x "$DAEMON" -p "$PIDFILE" -b
- ;;
- stop)
- echo "Stopping voice-agent..."
- start-stop-daemon -K -p "$PIDFILE" -o
- ;;
- restart)
- "$0" stop
- sleep 1
- "$0" start
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement