Discussion Locked

help adding service to startup on boot?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am running ARCserve for linux on Redhat7.0.
To start the ARCserve service i have to type "astart" from the command prompt. Is there anyway to set this up so that is starts up automatically when the computer is booted/rebooted?

5 replies

by cpfeiffe

cd /etc/rc/rc3.d
In here create a startup script called S##arcserv. ## is the number that allows the script to start in a certain order based on the rest of the scripts in the directory. You can start this at any point of the bootup you wish, as longs as the other services required by arcserv are already running. Typically everything you will need is started by the rc2.d scripts that run before the rc3.d scripts. In this newly created script type in the full path to astart. You can get fancy and use case statements to also stop the program or trap for error conditions, etc. (just review the other startup scripts) or you can simply create a one liner that runs astart. You also don't have to call it arcserv, you can call the script anything you want. All that is important is that it starts with a capital S and the S is followed by a number, after that the rest of the name is justa n identifier.

Good luck.

by carl

Thanks for your help. Being new to Linux & Scripting do you know of any good books or sites on scripting?

Thanks
Carl.

by kevin anderson

The first answer is completely correct.

If you want a quicker solution though, edit /etc/rc.d/rc.local, and add

astart

to the end of the file.

This is linuxes equivilent to DOS/Windows' AUTOEXEC.BAT file.

I'd suggest that rather than using astart, you use the full path name as well. (for example, /sbin/astart (or wherever it's located.)

Enjoy...
Kev.

by carl

Thanks as well for your help. I was had tried this, but it didn't work. A big part of the solution turned out to be an undocumented environment variable needed to be set up prior to trying to run astart!

Cheers
Carl.

This discussion is closed to new replies.