#!/bin/sh
#
# Created by chengjt10131021 for start-up zdiag
# Copyright (c) 2012 ZTE Incorporated.  All Rights Reserved.
# ZTE Proprietary and Confidential.

# start_zdiag    init.d script to start ZTE diag daemon

set -e

case "$1" in
	start)
		echo -n "Starting zdiag: "
		start-stop-daemon -S -b -a /usr/bin/zdiag
		echo "done"
		;;
	stop)
		echo -n "Stopping zdiag: "
		start-stop-daemon -K -n zdiag
		echo "done"
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		echo "Usage zdiag { start | stop | restart}" >&2
		exit 1
		;;
esac

