#!/bin/sh
# Copyright (c) 2011,2019 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.

# 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 /usr/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
