LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how can i run acommand in every startup (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-run-acommand-in-every-startup-507037/)

adam_blackice 12-03-2006 03:03 AM

how can i run acommand in every startup
 
hello all,

can any body tell me how can i run acommand everytime the machine start at the start up something like intializing aspecific service > /opt/lammp/lammp start who can i get that working every time machine started and thanx :)

btmiller 12-03-2006 03:09 AM

Put the command in /etc/rc.local on most systems. When I used SuSE 9.3 it didn't have rc.local, so if that's not been changed you'll have to write a little init script and put it in /etc/init.d (use one of the other scripts as a template, ideally one that starts up in your target runlevel) then if you've got all the requisite header information use 'chkconfig <myservice> on" where <myservice> is the name of the file.

musicman_ace 12-03-2006 03:10 AM

there is a local.start file with your init scripts that you can add commands to for startup.

I don't know exactly where SusE puts it, but it is usually in one of the following locations

/etc/rc.d/
/etc/init.d/
/etc/conf.d/

adam_blackice 12-03-2006 04:54 AM

thanx for all :)

ye it works i found it /etc/init.d then i put the command in boot.local file and it works thanx agin


All times are GMT -5. The time now is 09:58 PM.