ovsdb-server-r1 855 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2013 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. description="Open vSwitch database server"
  5. remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
  6. remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
  7. private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
  8. certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
  9. bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
  10. command="/usr/sbin/ovsdb-server"
  11. command_args="
  12. --pidfile
  13. --detach
  14. --monitor
  15. ${remote_punix}
  16. ${remote_db}
  17. ${private_key}
  18. ${certificate}
  19. ${bootstrap_ca_cert}
  20. ${DATABASE}
  21. ${OPTIONS}"
  22. pidfile="/var/run/openvswitch/ovsdb-server.pid"
  23. depend() {
  24. need localmount
  25. use logger
  26. }
  27. start_pre() {
  28. checkpath -d "/var/run/openvswitch" -m 0750
  29. }