blob: b4d2195022d440f6eca917cf0af43c1c90458ac3 [file] [log] [blame]
Patrick Williams8dd68482022-10-04 07:57:18 -05001#!/bin/sh
2
3# Source function library
4. /etc/init.d/functions
5
6NAME=tee-supplicant
7PATH=/sbin:/bin:/usr/sbin:/usr/bin
8DESC="OP-TEE Supplicant"
9
10DAEMON=@sbindir@/$NAME
11
12test -f $DAEMON || exit 0
13
14test -f @sysconfdir@/default/$NAME && . @sysconfdir@/default/$NAME
15test -f @sysconfdir@/default/rcS && . @sysconfdir@/default/rcS
16
17SSD_OPTIONS="--oknodo --quiet --exec $DAEMON -- -d $OPTARGS"
18
19set -e
20
21case $1 in
22 start)
23 echo -n "Starting $DESC: "
24 start-stop-daemon --start $SSD_OPTIONS
25 echo "${DAEMON##*/}."
26 ;;
27 stop)
28 echo -n "Stopping $DESC: "
29 start-stop-daemon --stop $SSD_OPTIONS
30 echo "${DAEMON##*/}."
31 ;;
32 restart|force-reload)
33 $0 stop
34 sleep 1
35 $0 start
36 ;;
37 status)
38 status ${DAEMON} || exit $?
39 ;;
40 *)
41 echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
42 exit 1
43 ;;
44esac
45
46exit 0