LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 07-08-2005, 05:11 PM   #1
ryan0204
LQ Newbie
 
Registered: May 2004
Posts: 7

Rep: Reputation: 0
Setting up an autostart script


I have a torrent tracker setup on my server and right now to start it up I connect to my box and execute a file called bnbt_scren which looks like this:
Code:
#!/bin/bash

screen -dmS TRACKER ./bnbt
I want to have that execute when the server starts up, so I copied that file to /etc/rc.d/init.d and changed it to include the full path to the bnbt tracker:
Code:
#!/bin/bash

screen -dmS TRACKER ./home/httpd/vhosts/mywebsite.com/trinity/bnbt
That doesn't seem to work. I'm fairly new to linux, so is there anything I did wrong with the file? (the server is running red hat AS3)
 
Old 07-08-2005, 05:57 PM   #2
mhallbiai
Member
 
Registered: Jun 2005
Posts: 96

Rep: Reputation: 16
you should link it in your /etc/rc3.d/ (and/or rc5.d -- whatever runlevels you want it to start in)

Code:
ln -s /etc/init.d/bnbt_scren /etc/rc3.d/S90bnbt_scren
ln -s /etc/init.d/bnbt_scren /etc/rc3.d/K90bnbt_scren
you may want to modify the script slightly to allow for starting/stopping if you so choose, otherwise just the S should be used if you dont care about killing it when changing runlevels. you can look at the other scripts in /etc/init.d/ for examples of this

the S## can be different, this is just "when" it will be started in the order of things (so obviously, network would need to be started before this if it relies on Internet access )

or even easier would be to toss it in /etc/rc.local


hope this helps
 
Old 07-12-2005, 02:49 AM   #3
ryan0204
LQ Newbie
 
Registered: May 2004
Posts: 7

Original Poster
Rep: Reputation: 0
thanks for the help.
 
  


Reply



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
Shell script adding autostart gnome script Coolrunr Programming 3 01-01-2009 02:23 PM
Setting up an autostart script ryan0204 Linux - Software 2 07-10-2005 05:04 PM
how to add a sh-script to the autostart JohnWayne Linux - General 1 09-18-2004 09:09 AM
AutoStart a Script extremebfn Slackware 2 09-11-2004 09:25 PM
Waimea Autostart script?? simbolo Linux - Software 7 02-12-2003 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:25 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
Open Source Consulting | Domain Registration