Automatic start of application after init
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.sh
executes 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.