xsd.initrc 821 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/sbin/openrc-run
  2. SVCNAME=xsd
  3. XSD_PIDFILE=/var/run/xsd.pid
  4. XSD_USER=root
  5. XSD_HOME=/var/run
  6. INST_PREFIX=/usr/local
  7. COMMAND=$INST_PREFIX/sbin/xsd
  8. #ARGS="-L -aK KEX_all -aC C_all -aH H_all"
  9. echo "SET ARGS in this script to define allow KEX, cipher and hmac algs"
  10. exit 1
  11. depend() {
  12. need net
  13. use dns logger
  14. }
  15. checkconfig() {
  16. if [ ! -f "$COMMAND" ] ; then
  17. eerror "$COMMAND not installed" || return 1
  18. fi
  19. return 0
  20. }
  21. start() {
  22. checkconfig || return 1
  23. ebegin "Starting ${SVCNAME}"
  24. start-stop-daemon \
  25. -d ${XSD_HOME} \
  26. --make-pidfile --pidfile ${XSD_PIDFILE} \
  27. --start --quiet --background \
  28. --exec "${COMMAND}" -- ${ARGS}
  29. eend $?
  30. }
  31. stop() {
  32. ebegin "Stopping ${SVCNAME}"
  33. start-stop-daemon --stop --quiet --pidfile $XSD_PIDFILE
  34. eend $?
  35. }