<?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>topic Re: Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878730#M279716</link>
    <description>I made the change to the script, here is what I have :&lt;BR /&gt;&lt;BR /&gt;set -x&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;start()&lt;BR /&gt;{&lt;BR /&gt;echo "Starting jboss.."&lt;BR /&gt;sudo -u com "/export/home/tmp/cm/jboss-4.0.4.GA/bin/run.sh &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;stopjb()&lt;BR /&gt;{&lt;BR /&gt;echo "Stopping jboss.."&lt;BR /&gt;sudo -u com "/export/home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;restart()&lt;BR /&gt;{&lt;BR /&gt;stopjb&lt;BR /&gt;&lt;BR /&gt;# give stuff some time to stop before we restart&lt;BR /&gt;sleep 60&lt;BR /&gt;&lt;BR /&gt;# protect against any services that can't stop before we restart (warning this kills all Java instances running as 'com' user)&lt;BR /&gt;#sudo -u com /usr/sbin/killall java&lt;BR /&gt;&lt;BR /&gt;start&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;case "$1" in&lt;BR /&gt;  start)&lt;BR /&gt;        start&lt;BR /&gt;        ;;&lt;BR /&gt;  stopjb)&lt;BR /&gt;        stopjb&lt;BR /&gt;        ;;&lt;BR /&gt;  restart)&lt;BR /&gt;        restart&lt;BR /&gt;        ;;&lt;BR /&gt;  *)&lt;BR /&gt;        echo "Usage: jboss {start|stopjb|restart}"&lt;BR /&gt;        exit 1&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;---------------&lt;BR /&gt;&lt;BR /&gt;Here is the output I am getting : &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;./jboss restart&lt;BR /&gt;+ restart&lt;BR /&gt;Stopping jboss..&lt;BR /&gt;sudo: /home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;: command not found&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;./jboss start  &lt;BR /&gt;+ start&lt;BR /&gt;Starting jboss..&lt;BR /&gt;sudo: /home/tmp/cm/jboss-4.0.4.GA/bin/run.sh &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;: command not found&lt;BR /&gt;+ exit 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;./jboss stopjb&lt;BR /&gt;+ stopjb&lt;BR /&gt;Stopping jboss..&lt;BR /&gt;sudo: /home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;: command not found&lt;BR /&gt;+ exit 0&lt;BR /&gt;</description>
    <pubDate>Thu, 12 Oct 2006 16:19:58 GMT</pubDate>
    <dc:creator>Hunki</dc:creator>
    <dc:date>2006-10-12T16:19:58Z</dc:date>
    <item>
      <title>Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878724#M279710</link>
      <description>Can somebody suggest whats wrong with this script : &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#! /bin/sh&lt;BR /&gt;&lt;BR /&gt;start()&lt;BR /&gt;{&lt;BR /&gt;echo "Starting jboss.."&lt;BR /&gt;sudo -u com /home/tmp/cm/jboss-4.0.4.GA/bin/run.sh &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;stop()&lt;BR /&gt;{&lt;BR /&gt;echo "Stopping jboss.."&lt;BR /&gt;sudo -u com /home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;restart()&lt;BR /&gt;{&lt;BR /&gt;stop&lt;BR /&gt;&lt;BR /&gt;# give stuff some time to stop before we restart&lt;BR /&gt;sleep 60&lt;BR /&gt;&lt;BR /&gt;# protect against any services that can't stop before we restart (warning this kills all Java instances running as 'com' user)&lt;BR /&gt;sudo -u com /usr/sbin/killall java&lt;BR /&gt;&lt;BR /&gt;start&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;case "$1" in&lt;BR /&gt;  start)&lt;BR /&gt;        start&lt;BR /&gt;        ;;&lt;BR /&gt;  stop)&lt;BR /&gt;        stop&lt;BR /&gt;        ;;&lt;BR /&gt;  restart)&lt;BR /&gt;        restart&lt;BR /&gt;        ;;&lt;BR /&gt;  *)&lt;BR /&gt;        echo "Usage: jboss {start|stop|restart}"&lt;BR /&gt;        exit 1&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Oct 2006 16:00:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878724#M279710</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-10-11T16:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878725#M279711</link>
      <description>Are you getting errors when you run it?  More details of what it is, or isn't doing, would be helpful.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Oct 2006 16:12:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878725#M279711</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-10-11T16:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878726#M279712</link>
      <description>Errors would be nice...&lt;BR /&gt;&lt;BR /&gt;First off, you have a space between #! and /bin/sh&lt;BR /&gt;&lt;BR /&gt;Try adding a set -x on second line and re running it.&lt;BR /&gt;&lt;BR /&gt;I would add ' ' around the function names:&lt;BR /&gt;&lt;BR /&gt;'start'()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 11 Oct 2006 16:19:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878726#M279712</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-10-11T16:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878727#M279713</link>
      <description>Hunki , &lt;BR /&gt;&lt;BR /&gt;What error are u getting , &lt;BR /&gt;You can execute the script with -x option and hopefully you can debug the problem.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.</description>
      <pubDate>Thu, 12 Oct 2006 01:34:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878727#M279713</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2006-10-12T01:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878728#M279714</link>
      <description>Hi Hunki,&lt;BR /&gt;&lt;BR /&gt;be careful about the sematic of the killall-command. It IS different to the LINUX-Killall.&lt;BR /&gt;&lt;BR /&gt;SEE killall(1M):&lt;BR /&gt;DESCRIPTION&lt;BR /&gt;killall is a procedure used by /usr/sbin/shutdown to kill all active processes not directly related to the shutdown procedure.&lt;BR /&gt;&lt;BR /&gt;rgds &lt;BR /&gt;HGH&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Oct 2006 01:53:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878728#M279714</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2006-10-12T01:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878729#M279715</link>
      <description>Hi,&lt;BR /&gt;additionally to the above comments have you tried:&lt;BR /&gt;sudo -u com -c "/home/tmp/cm/jboss-4.0.4.GA/bin/run.sh &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;"&lt;BR /&gt;&lt;BR /&gt;you may need the -c option and quotes to get the redirection and background to work.&lt;BR /&gt;&lt;BR /&gt;Also, change the function name stop as it may be a semi-reserved word.</description>
      <pubDate>Thu, 12 Oct 2006 02:05:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878729#M279715</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-10-12T02:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878730#M279716</link>
      <description>I made the change to the script, here is what I have :&lt;BR /&gt;&lt;BR /&gt;set -x&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;start()&lt;BR /&gt;{&lt;BR /&gt;echo "Starting jboss.."&lt;BR /&gt;sudo -u com "/export/home/tmp/cm/jboss-4.0.4.GA/bin/run.sh &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;stopjb()&lt;BR /&gt;{&lt;BR /&gt;echo "Stopping jboss.."&lt;BR /&gt;sudo -u com "/export/home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;restart()&lt;BR /&gt;{&lt;BR /&gt;stopjb&lt;BR /&gt;&lt;BR /&gt;# give stuff some time to stop before we restart&lt;BR /&gt;sleep 60&lt;BR /&gt;&lt;BR /&gt;# protect against any services that can't stop before we restart (warning this kills all Java instances running as 'com' user)&lt;BR /&gt;#sudo -u com /usr/sbin/killall java&lt;BR /&gt;&lt;BR /&gt;start&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;case "$1" in&lt;BR /&gt;  start)&lt;BR /&gt;        start&lt;BR /&gt;        ;;&lt;BR /&gt;  stopjb)&lt;BR /&gt;        stopjb&lt;BR /&gt;        ;;&lt;BR /&gt;  restart)&lt;BR /&gt;        restart&lt;BR /&gt;        ;;&lt;BR /&gt;  *)&lt;BR /&gt;        echo "Usage: jboss {start|stopjb|restart}"&lt;BR /&gt;        exit 1&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;---------------&lt;BR /&gt;&lt;BR /&gt;Here is the output I am getting : &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;./jboss restart&lt;BR /&gt;+ restart&lt;BR /&gt;Stopping jboss..&lt;BR /&gt;sudo: /home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;: command not found&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;./jboss start  &lt;BR /&gt;+ start&lt;BR /&gt;Starting jboss..&lt;BR /&gt;sudo: /home/tmp/cm/jboss-4.0.4.GA/bin/run.sh &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;: command not found&lt;BR /&gt;+ exit 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;./jboss stopjb&lt;BR /&gt;+ stopjb&lt;BR /&gt;Stopping jboss..&lt;BR /&gt;sudo: /home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;: command not found&lt;BR /&gt;+ exit 0&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Oct 2006 16:19:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878730#M279716</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-10-12T16:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878731#M279717</link>
      <description>You probably need to fully qualify the path to 'sudo'.&lt;BR /&gt;&lt;BR /&gt;If sudo is in /usr/local/bin the do:&lt;BR /&gt;&lt;BR /&gt;/usr/locall/bin/sudo -u com /home/tmp/cm/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;</description>
      <pubDate>Thu, 12 Oct 2006 16:28:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878731#M279717</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-10-12T16:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878732#M279718</link>
      <description>Got this modified a little : &lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;start()&lt;BR /&gt;{&lt;BR /&gt;echo "Starting jboss.."&lt;BR /&gt;/usr/bin/su - com -c "/export/home/tmp/jboss-4.0.4.GA/bin/run.sh &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;stopjb()&lt;BR /&gt;{&lt;BR /&gt;echo "Stopping jboss.."&lt;BR /&gt;/usr/bin/su - aqgt -c "/export/home/tmp/jboss-4.0.4.GA/bin/shutdown.sh -S &amp;amp;"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;restart()&lt;BR /&gt;{&lt;BR /&gt;stopjb&lt;BR /&gt;&lt;BR /&gt;# give stuff some time to stop before we restart&lt;BR /&gt;sleep 60&lt;BR /&gt;&lt;BR /&gt;# protect against any services that can't stop before we restart (warning this kills all Java instances running as 'com' user)&lt;BR /&gt;#/usr/bin/su - com -c "/usr/bin/kill java"&lt;BR /&gt;&lt;BR /&gt;start&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;case "$1" in&lt;BR /&gt;  start)&lt;BR /&gt;        start&lt;BR /&gt;        ;;&lt;BR /&gt;  stopjb)&lt;BR /&gt;        stopjb&lt;BR /&gt;        ;;&lt;BR /&gt;  restart)&lt;BR /&gt;        restart&lt;BR /&gt;        ;;&lt;BR /&gt;  *)&lt;BR /&gt;        echo "Usage: jboss {start|stopjb|restart}"&lt;BR /&gt;        exit 1&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Need to make the kill work in the restart function. Is there a way out .Also does the script looks workable apart from that.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Tue, 17 Oct 2006 10:53:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878732#M279718</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-10-17T10:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878733#M279719</link>
      <description>un-comment the killall command and it should work i.e. change&lt;BR /&gt;#/usr/bin/su - com -c "/usr/bin/kill java"&lt;BR /&gt;to&lt;BR /&gt;/usr/bin/su - com -c "/usr/bin/kill java"&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Oct 2006 12:14:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3878733#M279719</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-10-17T12:14:45Z</dc:date>
    </item>
  </channel>
</rss>

