Solved

Linux, how to configure a script that will start at boot up

Posted on 2013-11-19
2
233 Views
Last Modified: 2013-11-19
In RHEL 6.4

How do I configure a script that will execute upon bootup

(This script will only contain "su - mqm")
0
Comment
Question by:Los Angeles1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 250 total points
ID: 39660500
Normally you can put your script inside

/etc/rc.local

That will cause it to execute at run time.

However, you are using a command that is to change user.  This would not work this way.


Can you elaborate what exactly are you trying to achieve?
0
 
LVL 19

Accepted Solution

by:
xterm earned 250 total points
ID: 39660503
You can either edit /etc/rc.d/rc.local and put the command directly in there, or you can call the script name from rc.local

So either put in:

/path/to/command <command arguments>

or put in:

/usr/local/bin/myscript

(example name above, and be sure you make it excecutable by doing chmod 755)
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question