karaf-service-template.solaris-smf 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" ?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!DOCTYPE service_bundle
  17. SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
  18. <service_bundle type="manifest" name="application/${KARAF_SERVICE_NAME}">
  19. <service version="1" type="service" name="application/${KARAF_SERVICE_NAME}">
  20. <create_default_instance enabled='false' />
  21. <single_instance />
  22. <dependency
  23. restart_on="none"
  24. type="service"
  25. name="multi_user_dependency"
  26. grouping="require_all">
  27. <service_fmri value="svc:/milestone/multi-user"/>
  28. </dependency>
  29. <method_context>
  30. <method_credential user='${KARAF_SERVICE_USER}' group='${KARAF_SERVICE_GROUP}'/>
  31. <method_environment>
  32. <envvar name="JAVA_HOME" value="${JAVA_HOME}"/>
  33. </method_environment>
  34. </method_context>
  35. <!-- *************************************************************** -->
  36. <!-- STOP/START -->
  37. <!-- *************************************************************** -->
  38. <exec_method
  39. timeout_seconds="60"
  40. type="method"
  41. name="start"
  42. exec="${KARAF_SERVICE_PATH}/bin/${KARAF_SERVICE_EXECUTABLE} daemon &amp;">
  43. </exec_method>
  44. <exec_method
  45. timeout_seconds="60"
  46. type="method"
  47. name="stop"
  48. exec="${KARAF_SERVICE_PATH}/bin/${KARAF_SERVICE_EXECUTABLE} stop">
  49. </exec_method>
  50. <!-- *************************************************************** -->
  51. <!-- -->
  52. <!-- *************************************************************** -->
  53. <!-- do not restart the service in case of errors -->
  54. <property_group name='startd' type='framework'>
  55. <propval name='duration'
  56. type='astring'
  57. value='transient'/>
  58. <propval name='ignore_error'
  59. type='astring'
  60. value='core,signal'/>
  61. </property_group>
  62. <stability value='Evolving' />
  63. <template>
  64. <common_name>
  65. <loctext xml:lang="C">
  66. ${KARAF_SERVICE_NAME}
  67. </loctext>
  68. </common_name>
  69. <description>
  70. <loctext xml:lang="C">
  71. ${KARAF_SERVICE_NAME}
  72. </loctext>
  73. </description>
  74. </template>
  75. </service>
  76. </service_bundle>