18
18
DESC="Trusted Computing daemon"
20
test -x $DAEMON || exit 0
20
test -x "${DAEMON}" || exit 0
26
echo -n "Starting $DESC: "
26
echo -n "Starting ${DESC}: "
27
27
if [ ! -e /dev/tpm* ]
29
29
echo "device driver not loaded, aborting."
33
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
33
start-stop-daemon --start --quiet --background --make-pid --pidfile /var/run/${NAME}.pid --exec ${DAEMON} -- -f ${DAEMON_OPTS}
38
echo -n "Stopping $DESC: "
39
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --oknodo --exec $DAEMON
38
echo -n "Stopping ${DESC}: "
39
start-stop-daemon --stop --quiet --pidfile /var/run/${NAME}.pid --exec ${DAEMON}
43
43
restart|force-reload)
44
echo -n "Restarting $DESC: "
45
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --oknodo --exec $DAEMON
49
echo "device driver not loaded, aborting."
52
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
57
if [ -f /var/run/$NAME.pid ]
50
if [ -f /var/run/${NAME}.pid ]
59
echo "$NAME is running."
52
echo "${NAME} is running."
61
echo "$NAME is not running."
54
echo "${NAME} is not running."
68
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
60
echo "Usage: ${NAME} {start|stop|restart|force-reload|status}" >&2