#  ---------------------------------------------------------------------------
#   Copyright (c) 2011 QUALCOMM Incorporated.  All Rights Reserved.
#   QUALCOMM Proprietary and Confidential.
#  ---------------------------------------------------------------------------
#

#! /bin/sh
#
# time_service init.d script for time_service daemon

set -e

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

exit 0
