Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
537 B

#!/bin/bash
PIDFILE=/var/run/tabrmd.pid
case "$1" in
start)
su - tss -c "/usr/sbin/tpm2-abrmd -l syslog" &
echo $! > $PIDFILE
;;
status)
if [ -f $PIDFILE ] && kill -0 $(< $PIDFILE) 2>/dev/null ; then
echo "TPM2-Abrmd is running."
else
echo "TPM2-Abrmd is not running."
fi
;;
stop)
if [ -f $PIDFILE ] && kill -0 $(< $PIDFILE) 2>/dev/null ; then
kill -15 $(< $PIDFILE)
rm $PIDFILE
fi
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
exit 0