LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   to 'start only' a shell script on boot up (https://www.linuxquestions.org/questions/linux-newbie-8/to-start-only-a-shell-script-on-boot-up-696869/)

aj_1988 01-12-2009 08:25 PM

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

billymayday 01-12-2009 08:52 PM

put it in /etc/rc.local?

PTrenholme 01-12-2009 09:19 PM

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



All times are GMT -5. The time now is 11:22 PM.