<?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: start stop scripts for application in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155690#M31833</link>
    <description>You might also want to look at the 'runuser' command.&lt;BR /&gt;&lt;BR /&gt;It will do basically the same thing for what you're intending, but bypasses some of the PAM checks.&lt;BR /&gt;&lt;BR /&gt;If you're on a RedHat/Centos system, you might also want to use the built-in 'functions' that are available to the init.d startup/shutdown commands, in particular the 'daemon' command (with the '--user &lt;USER&gt;' flag).  This wraps various things and ends up calling 'runuser', but also logs it in the same fashion as all the other commands.&lt;BR /&gt;&lt;BR /&gt;The 'killproc' routine however doesn't have any as-user support however.&lt;/USER&gt;</description>
    <pubDate>Thu, 06 Mar 2008 03:08:20 GMT</pubDate>
    <dc:creator>Stuart Browne</dc:creator>
    <dc:date>2008-03-06T03:08:20Z</dc:date>
    <item>
      <title>start stop scripts for application</title>
      <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155684#M31827</link>
      <description>I need to start and stop an application by a specific user NOT root..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Mar 2008 09:50:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155684#M31827</guid>
      <dc:creator>Jon Gomersall</dc:creator>
      <dc:date>2008-03-05T09:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: start stop scripts for application</title>
      <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155685#M31828</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;try running "su $USERNAME -c $COMMAND".&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Patrick</description>
      <pubDate>Wed, 05 Mar 2008 11:26:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155685#M31828</guid>
      <dc:creator>Patrick Terlisten</dc:creator>
      <dc:date>2008-03-05T11:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: start stop scripts for application</title>
      <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155686#M31829</link>
      <description>Does that means that you want that a normal user (not root) should be able to start an application? If so, use SUDO.</description>
      <pubDate>Wed, 05 Mar 2008 13:14:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155686#M31829</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2008-03-05T13:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: start stop scripts for application</title>
      <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155687#M31830</link>
      <description>I want to start an appication as a specific user when the server boots up...&lt;BR /&gt;&lt;BR /&gt;Also need to shutdown the applications as the same user on system shutdown.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Mar 2008 15:09:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155687#M31830</guid>
      <dc:creator>Jon Gomersall</dc:creator>
      <dc:date>2008-03-05T15:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: start stop scripts for application</title>
      <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155688#M31831</link>
      <description>e.g. If your user is called jim and your application is /home/jim/application, you could add this to /etc/rc.d/rc.local:&lt;BR /&gt;&lt;BR /&gt;su -c '/home/jim/application' jim &amp;amp;</description>
      <pubDate>Wed, 05 Mar 2008 15:57:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155688#M31831</guid>
      <dc:creator>Ben Stokes</dc:creator>
      <dc:date>2008-03-05T15:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: start stop scripts for application</title>
      <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155689#M31832</link>
      <description>&lt;!--!*#--&gt;One possible example...&lt;BR /&gt;&lt;BR /&gt;/etc/init.d/myapp:&lt;BR /&gt;-------------&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#&lt;BR /&gt;# chkconfig: 235 99 10&lt;BR /&gt;# description: myapp Startup/Shutdown Script&lt;BR /&gt;&lt;BR /&gt;case "$1" in&lt;BR /&gt;  start)&lt;BR /&gt;         su -c "/app/start_myapp - USERID&lt;BR /&gt;         touch /var/lock/subsys/myapp&lt;BR /&gt;         ;;&lt;BR /&gt;  stop)&lt;BR /&gt;         su -c "/app/stop_myapp - USERID&lt;BR /&gt;         rm -f /var/lock/subsys/myapp&lt;BR /&gt;         ;;&lt;BR /&gt;  *)&lt;BR /&gt;         echo "Usage: $0 {start|stop}"&lt;BR /&gt;         ;;&lt;BR /&gt;esac&lt;BR /&gt;-------------</description>
      <pubDate>Thu, 06 Mar 2008 00:46:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155689#M31832</guid>
      <dc:creator>Jared Middleton</dc:creator>
      <dc:date>2008-03-06T00:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: start stop scripts for application</title>
      <link>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155690#M31833</link>
      <description>You might also want to look at the 'runuser' command.&lt;BR /&gt;&lt;BR /&gt;It will do basically the same thing for what you're intending, but bypasses some of the PAM checks.&lt;BR /&gt;&lt;BR /&gt;If you're on a RedHat/Centos system, you might also want to use the built-in 'functions' that are available to the init.d startup/shutdown commands, in particular the 'daemon' command (with the '--user &lt;USER&gt;' flag).  This wraps various things and ends up calling 'runuser', but also logs it in the same fashion as all the other commands.&lt;BR /&gt;&lt;BR /&gt;The 'killproc' routine however doesn't have any as-user support however.&lt;/USER&gt;</description>
      <pubDate>Thu, 06 Mar 2008 03:08:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/start-stop-scripts-for-application/m-p/4155690#M31833</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2008-03-06T03:08:20Z</dc:date>
    </item>
  </channel>
</rss>

