<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to install some of the dependencies prior to start the custom service(just one time) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-install-some-of-the-dependencies-prior-to-start-the/m-p/27375#M5795</link>
    <description>&lt;P&gt;Thanks for the reply. dlo.&lt;/P&gt;&lt;P&gt;It works.&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2015 10:57:10 GMT</pubDate>
    <dc:creator>ashutosh_0507</dc:creator>
    <dc:date>2015-05-13T10:57:10Z</dc:date>
    <item>
      <title>How to install some of the dependencies prior to start the custom service(just one time)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-install-some-of-the-dependencies-prior-to-start-the/m-p/27096#M5793</link>
      <description>&lt;P&gt;Hello All, I am building a custom Service using CSD. &amp;nbsp;I want to install some of the dependencies prior to start the service(just one time) for. example installation of drivers, starting database servers etc. . I am doing that by calling a shell script prior to exec. But the problem is whenever there is a call to start to the service all the pre strart process run again. How can i achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#!/bin/bash
CMD=$1

case $CMD in
  (start)
    echo "Starting the MyApp Service"

        cp -r  /opt/cloudera/parcels/myapp-2.1 /opt/
       
        chmod 777 -R /opt/myapp-2.1/
        sh /opt/myapp-2.1/resource/scripts/installer/MainScript
        exec python -m SimpleHTTPServer 8080
    	;;
  (stop)
   	sh /opt/myapp-2.1/resource/scripts/installer/StopAll
   	;;
  (restart)
   	sh /opt/myapp-2.1/resource/scripts/installer/RestartAll
   	;;

  (*)
    	echo "Don't understand [$CMD]"
    	;;
esac&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 May 2015 05:35:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-install-some-of-the-dependencies-prior-to-start-the/m-p/27096#M5793</guid>
      <dc:creator>ashutosh_0507</dc:creator>
      <dc:date>2015-05-07T05:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to install some of the dependencies prior to start the custom service(just one time)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-install-some-of-the-dependencies-prior-to-start-the/m-p/27146#M5794</link>
      <description>Create an initialization command and reference it in your SDL in serviceInit (see &lt;A target="_blank" href="https://github.com/cloudera/cm_ext/wiki/Service-Descriptor-Language-Reference#serviceinit)."&gt;https://github.com/cloudera/cm_ext/wiki/Service-Descriptor-Language-Reference#serviceinit).&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Move all of your one-time initialization logic to that command.</description>
      <pubDate>Fri, 08 May 2015 01:04:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-install-some-of-the-dependencies-prior-to-start-the/m-p/27146#M5794</guid>
      <dc:creator>Darren</dc:creator>
      <dc:date>2015-05-08T01:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to install some of the dependencies prior to start the custom service(just one time)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-install-some-of-the-dependencies-prior-to-start-the/m-p/27375#M5795</link>
      <description>&lt;P&gt;Thanks for the reply. dlo.&lt;/P&gt;&lt;P&gt;It works.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 10:57:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-install-some-of-the-dependencies-prior-to-start-the/m-p/27375#M5795</guid>
      <dc:creator>ashutosh_0507</dc:creator>
      <dc:date>2015-05-13T10:57:10Z</dc:date>
    </item>
  </channel>
</rss>

