Project

General

Profile

lighttpd.xml

/var/svc/manifest/network/lighttpd.xml - alexs77, 2008-09-11 09:43

 
1
<?xml version="1.0"?>
2
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
3
<!--
4
    Copyright 2005 Sergiusz Pawlowicz.  All rights reserved.
5
    http://pawlowicz.name/
6
    Use is subject to license terms.
7
 
8
    ident       "0.1"
9

10
    Modified by Shanti Subramanyam to restrict privileges
11
-->
12

    
13
<service_bundle type='manifest' name='lighttpd'>
14

    
15
<service
16
        name='network/lighttpd'
17
        type='service'
18
        version='1'>
19

    
20
        <!--
21
          Because we may have multiple instances of network/lighttpd
22
          provided by different implementations, we keep dependencies
23
          and methods within the instance.
24
        -->
25

    
26
        <instance name='lighttpd' enabled='false'>
27
                <dependency name='loopback'
28
                    grouping='require_all'
29
                    restart_on='error'
30
                    type='service'>
31
                        <service_fmri value='svc:/network/loopback:default'/>
32
                </dependency>
33

    
34
                <dependency name='physical'
35
                    grouping='optional_all'
36
                    restart_on='error'
37
                    type='service'>
38
                        <service_fmri value='svc:/network/physical:default'/>
39
                </dependency>
40

    
41
                <dependency name='multiuser-server'
42
                    grouping='require_all'
43
                    restart_on='error'
44
                    type='service'>
45
                        <service_fmri value='svc:/milestone/multi-user-server:default'/>
46
                </dependency>
47
                
48
                <!-- restrict privileges and run as user webservd -->
49
                <method_context>
50
                       <method_credential
51
                                user='webservd' group='webservd'
52
                                privileges='basic,!proc_session,!proc_info,!file_link_any,net_privaddr' />
53
                </method_context>
54

    
55

    
56
                <exec_method
57
                        type='method'
58
                        name='start'
59
                        exec='/lib/svc/method/http-lighttpd start'
60
                        timeout_seconds='60' />
61

    
62
                <exec_method
63
                        type='method'
64
                        name='stop'
65
                        exec='/lib/svc/method/http-lighttpd stop'
66
                        timeout_seconds='60' />
67

    
68

    
69
                <exec_method
70
                        type='method'
71
                        name='refresh'
72
                        exec='/lib/svc/method/http-lighttpd refresh'
73
                        timeout_seconds='60' />
74

    
75
                <property_group name='startd' type='framework'>
76
                        <!-- sub-process core dumps shouldn't restart
77
                                session -->
78
                        <propval name='ignore_error' type='astring'
79
                                value='core,signal' />
80
                </property_group>
81

    
82
        </instance>
83

    
84
        <template>
85
                <common_name>
86
                        <loctext xml:lang='C'>
87
                                Lighttpd HTTP server
88
                        </loctext>
89
                </common_name>
90
                <documentation>
91
                        <manpage title='lighttpd' section='1M' />
92
                        <doc_link name='lighttpd.net'
93
                                uri='http://www.lighttpd.net/' />
94
                </documentation>
95
        </template>
96
</service>
97

    
98
</service_bundle>
99