<?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="manifest" name="django"> <service name="network/django" type="service" version="4"> <create_default_instance enabled="false"/> <!-- If there's no network, then there's no point in running --> <dependency name='network' grouping='require_all' restart_on='error' type='service'> <service_fmri value='svc:/milestone/network:default'/> </dependency> <dependency name="fs-local" grouping="require_all" restart_on="none" type="service"> <service_fmri value="svc:/system/filesystem/local"/> </dependency> <dependency name="django_var" grouping="require_all" restart_on="restart" type="path"> <service_fmri value="file://localhost/var/run/django"/> </dependency> <dependency name="django_admin" grouping="require_all" restart_on="restart" type="path"> <service_fmri value="file://localhost/usr/bin/django-admin.py"/> </dependency> <method_context> <method_credential user='webservd' group='webservd' /> </method_context> <exec_method type="method" name="start" exec="django-admin.py runfcgi --settings=%i.settings protocol=%{config/protocol} method=%{config/method} maxchildren=%{config/maxchildren} minspare=%{config/minspare} max$ timeout_seconds="60"/> <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/> <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60"/> <property_group name='general' type='framework'> <propval name='action_authorization' type='astring' value='solaris.smf.manage.django' /> <!-- If the authorization is intended to cover permanent enable/disable as well as temporary, add the following --> <propval name='value_authorization' type='astring' value='solaris.smf.manage.django' /> </property_group> <property_group name="startd" type="framework"> <!-- sub-process core dumps shouldn't restart session --> <propval name='ignore_error' type='astring' value='core,signal' /> </property_group> <property_group name='config' type='application'> <!-- other application properties --> <propval name='host' type='astring' value='' /> <propval name='port' type='integer' value='5' /> <property name="method" type="astring"> <astring_list> <value_node value="threaded" /> <value_node value="prefork" /> </astring_list> </property> <propval name='maxspare' type='integer' value='2' /> <propval name='minspare' type='integer' value='5' /> <propval name='daemonize' type='boolean' value='true' /> <property name='protocol' type="astring"> <astring_list> <value_node value="fcgi" /> <value_node value="scgi" /> <value_node value="ajp" /> </astring_list> </property> <propval name='maxchildren' type='integer' value='5' /> <propval name='value_authorization' type='astring' value='solaris.smf.value.django' /> </property_group> <instance name='signet' enabled='false'> <!-- instance-specific properties, methods, etc. go here. --> <property_group name='config' type='application'> <propval name='protocol' type='astring' value='fcgi' /> <propval name='method' type='astring' value='prefork' /> </property_group> </instance> <stability value="Unstable"/> <template> <common_name> <loctext xml:lang="C">Django CGI Daemon(s)</loctext> </common_name> <documentation> <doc_link name="django.org" uri="http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/"/> </documentation> </template> </service> </service_bundle>