Solaris SMF-service file for starting/stopping TeamCity?

I'm trying to use TeamCity on a Solaris 10+ server.

Has anyone created a SMF manifest for TeamCity?


Comment actions Permalink

(Answering my own post as it might help other solaris users some day...)

I created a first draft for a solaris smf service for teamcity.

  • Teamcity should be installed in /opt/teamcity (or have a symlink from there)
  • A user with name/group teamcity/teamcity must exist and it's home directory must be writeable by user

Save xml as /var/svc/manifest/local/teamcity.xml (or what ever you like...) and import with:

$ svccfg import /var/svc/manifest/local/teamcity.xml

Start service with:

$ svcadm enable teamcity

Check if service has started:

$ svcs -xv

If there's no output, it worked. If it didn't work, the log from the service is at /var/svc/log/application-teamcity\:default.log.


<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
    Manifest for Jetbrains TeamCity server                                                                                         
    Erik Tjernlund, 2009-01-15                                                                                      

<service_bundle type='manifest' name='TeamCity Continuous Integration Server'>

<service name='application/teamcity' type='service' version='1'>

  <create_default_instance enabled='false'/>

  <!-- Wait for network interfaces to be initialized -->
  <dependency name='network' grouping='require_all' restart_on='error' type='service'>
    <service_fmri value='svc:/milestone/network:default'/>

  <!-- Wait for all local filesystems to be mounted -->
  <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
    <service_fmri value='svc:/system/filesystem/local:default'/>

  <!-- Run as "teamcity" user and set environment variables -->
    <method_credential user='teamcity' group='teamcity' privileges='basic'/>
         value='-server -Xmx512m -XX:MaxPermSize=128m -Dlog4j.configuration=file:/opt/teamcity/conf/teamcity-server-log4j.x\
ml -Dteamcity_logs=/opt/teamcity/logs -Djava.awt.headless=true'/>

     exec='/opt/teamcity/bin/ %m'
     exec='/opt/teamcity/bin/ %m'

  <stability value='Unstable'/>

      <loctext xml:lang='C'> TeamCity Continuous Integration Server</loctext>
      <doc_link name='TeamCity website' uri=''/>


Comment actions Permalink

Erik, thanks a lot for your efforts!
This is an evidence of real community power for tools like TeamCity

Thanks again,


Please sign in to leave a comment.