17c909ec83
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
34 lines
527 B
Bash
34 lines
527 B
Bash
#! /bin/bash
|
|
#
|
|
# Copyright (c) 2015 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
DAEMON_PID_FILE="/var/run/new-service.pid"
|
|
|
|
case "$1" in
|
|
start)
|
|
touch ${DAEMON_PID_FILE}
|
|
exit 0
|
|
;;
|
|
stop)
|
|
rm -f ${DAEMON_PID_FILE}
|
|
exit 0
|
|
;;
|
|
status)
|
|
if [ -e ${DAEMON_PID_FILE} ]
|
|
then
|
|
exit 0
|
|
else
|
|
exit 3
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|status}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|