Automatic start of application after init

Solution Verified - Updated -

Issue

  • Application should start automcatically after executing init command, also it should get restarted automatically if it gets killed during normal processing.To achieve following line is added to the /etc/inittab file.

    pd:5:respawn:su - omcadm -exec "/opt/COMMON83/pm/bin/pmd.sh"
    

where omcadm is the admin user of application and pmd.sh is the script which starts the application. However, it doesn't seem to be working as expected.

  • After changing the line to following,

    pd:5:respawn:sudo -u omcadm -exec "/opt/COMMON83/pm/bin/pmd.sh"
    
  • It gives following error messages in /var/log/messages file

    Mar  7 11:16:32 omcusr init: Id "pd" respawning too fast: disabled for 5 minutes
    
  • The same command sudo -u omcadm -exec "/opt/COMMON83/pm/bin/pmd.shexecutes fine when run from the command line.

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content