Link to home
Start Free TrialLog in
Avatar of psimation
psimationFlag for South Africa

asked on

Loading daemon at startup/remote file downloads

How do you load a daemon automatically at startup ( apachectl). I installed apache manually after installation and obviously it is not in the list of startup services under "setup"
2nd, Is it possible to do a 'background" ftp operation, like downloading. I want to be able to telnet into my Linux server from a remote location and then start ftp downloads via telnet, but i need to log out again without the download stopping.
thanks.
Avatar of samri
samri
Flag of Malaysia image

psimation,
    To enable automatic startup of your Apache, you need to create a startup scripts in /etc/rc3.d (the path may vary depending on the Unix variance).  Perhaps a simple script like

   #!/bin/sh
   /usr/local/apache/bin/apachectl start

  will get the job done.  

  If you want to get a better (standard) scripts, you can look at the existing one and modify to fit you need.  It's quite simple.

For your second question:  There is a utility, which I'm not sure whether it's bundled with you Linux distribution, called screen.  To check, just type screen at the command prompt, or you can browse thru you package tools for it.

If you still can find it, you can browse to Metalab,
      http://metalab.unc.edu/pub/gnu/screen/
  to download the source.  You need to compile and install it on your system.

Screen will enable you to run processes and you can detach your login session while maintaining you processes to be running (won't killed upon login).

     Once you logged in, just type screen to invoke it (screen -help to get a list of options), and whenever you want to log out, just hit Ctrl-A-D, to detach you active screen.   The detached screen can be reattach by running screen -r (screen -list will list all available screen, screen -r <screen process id> will restore the respective screen running under that PPID).

good luck,

samri
Avatar of Alien Life-Form
Alien Life-Form

Greetings.

For number two, I would advise wget as in:

$ wget ftp://user:password@ftp.fubar.com/file/path/ark.tgz

It does multiple tries, restarts and the works in general.

Cheers,
   alf
Avatar of psimation

ASKER

in /etc I have a rc.d dir, under which I have rc0.d to rc6.d plus a couple of other dirs. In rc3.d I have a whole bunch of files, eg. K10pulse, K84apmd, S99linuxconf etc.
If I understand you correctly, i should use a normal text editor and create a file with #!/bin/sh
/usr/local/apache/bin/apachectl start

What should I name this file?
Does it matter?
ASKER CERTIFIED SOLUTION
Avatar of Alien Life-Form
Alien Life-Form

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial