LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2009, 09:25 PM   #1
aj_1988
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Smile to 'start only' a shell script on boot up


hi, i have a shell script and i just want to start the shell script on boot up. it will run till the system terminates .can anybody give me a solution please...
and i use ubuntu
thanx in advance
 
Old 01-12-2009, 09:52 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
put it in /etc/rc.local?
 
Old 01-12-2009, 10:19 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
That's what /etc/rc.local is for. Here's an example:
Code:
$ cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local

# Activate and mount all available volume groups with mount points in /etc/fstab
./etc/rc.d/rc.vg_activate

# Mount any "noauto" devices listed in /etc/fstab that are not already mounted
./etc/rc.d/rc.mount_noauto
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
start application using shell script Skiltron Linux - Software 2 12-24-2008 01:51 PM
Start csh script in the same shell ? Vilius AIX 1 11-18-2008 10:23 AM
Timed shell script start lpn1160 Linux - General 1 01-05-2006 01:00 AM
Shell Script to Start NVU Dooley Linux - Software 5 07-13-2004 08:12 PM
Help with Howto start a shell script at boot draven Linux - Newbie 7 03-04-2004 12:20 AM


All times are GMT -5. The time now is 02:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration