Solved

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

Posted on 2013-11-19
2
227 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now