服務通常由服務清單 (即 XML 檔案) 所定義,用以說明服務以及與該服務有關聯的所有實例。您可透過 svccfg import 指令將服務清單匯入儲存庫中。使用 Service Management Facility 時,服務的所有清單檔案皆必須位於下列位置:/var/svc/manifest。
使用 delete-service 指令可刪除服務。
以下是 Web 伺服器的清單檔案範例:
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!-- Copyright 2006 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms. -->
<service_bundle type='manifest' name='webserver7'>
<service name='network/http' type='service' version='1'>
<dependency name='filesystem' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<instance name='admin-server' enabled='false'>
<property_group name='start' type='method'>
<propval name='exec' type='astring' value='/var/opt/SUWwbsvr7/admin-server/bin/startserv'/>
<propval name='instanceRoot' type='astring' value='/var/opt/SUWwbsvr7'/>
<propval name='timeout' type='astring' value='300'/>
</property_group>
<property_group name='stop' type='method'>
<propval name='exec' type='astring' value='/var/opt/SUWwbsvr7/admin-server/bin/stopserv'/>
<propval name='timeout' type='astring' value='300'/>
</property_group>
<property_group name='refresh' type='method'>
<propval name='exec' type='astring' value='/var/opt/SUWwbsvr7/admin-server/bin/restartserv'/>
<propval name='timeout' type='astring' value='300'/>
</property_group>
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
</instance>
<instance name='https-mycompany.com' enabled='false'>
<property_group name='start' type='method'>
<propval name='exec' type='astring' value='/var/opt/SUWwbsvr7/https-mycompany.com/bin/startserv'/>
<propval name='instanceRoot' type='astring' value='/var/opt/SUWwbsvr7'/>
<propval name='timeout' type='astring' value='300'/>
</property_group>
<property_group name='stop' type='method'>
<propval name='exec' type='astring' value='/var/opt/SUWwbsvr7/https-mycompany.com/bin/stopserv'/>
<propval name='timeout' type='astring' value='300'/>
</property_group>
<property_group name='refresh' type='method'>
<propval name='exec' type='astring' value='/var/opt/SUWwbsvr7/https-mycompany.com/bin/restartserv'/>
<propval name='timeout' type='astring' value='300'/>
</property_group>
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
</instance>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>Sun Java System Web Server 7</loctext>
</common_name>
</template>
</service>
</service_bundle>