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.

33 lines
537 B

  1. #!/bin/bash
  2. PIDFILE=/var/run/tabrmd.pid
  3. case "$1" in
  4. start)
  5. su - tss -c "/usr/sbin/tpm2-abrmd -l syslog" &
  6. echo $! > $PIDFILE
  7. ;;
  8. status)
  9. if [ -f $PIDFILE ] && kill -0 $(< $PIDFILE) 2>/dev/null ; then
  10. echo "TPM2-Abrmd is running."
  11. else
  12. echo "TPM2-Abrmd is not running."
  13. fi
  14. ;;
  15. stop)
  16. if [ -f $PIDFILE ] && kill -0 $(< $PIDFILE) 2>/dev/null ; then
  17. kill -15 $(< $PIDFILE)
  18. rm $PIDFILE
  19. fi
  20. ;;
  21. *)
  22. echo "Usage: $0 {start|stop|status}"
  23. exit 1
  24. ;;
  25. esac
  26. exit 0