How can I add my own service when system startup?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How can I add my own service when system startup?
# 1  
Old 10-22-2002
How can I add my own service when system startup?

Hi All,

My OS is redhat 7.1. How can I start my own service (e.g. simple scripts) when the system is started?

I found something like /etc/rc.d, /etc/rc.init ...

But I have no idea on them, have anyone can help me?


regards
wilson
# 2  
Old 10-22-2002
/etc/rc0.d is the area used when shutting down the server
/etc/rc2.d is the area used on bootup


All you need to do, is to add you script in the /etc/rc2.d area.
lets say you call the scripts S98start

On bootup it will read your start and start whatever you are planning to run

then to stop whatever you have started (if needed) you can then create another script called /etc/rc0.d/K98stop todo the reverse of S98start.

i hope makes sense.
# 3  
Old 10-22-2002
The easiest way in Redhat is to add a line to /etc/rc.d/rc.local
It's just a text file that's run like a script. Make sure to add error handling, so you don't screw something up while booting if your file doesn't exist or is not executable...
# 4  
Old 10-24-2002
how about for others like hpux, aix
yls177
# 5  
Old 10-24-2002
AIX is using rc.local .....

HP is using /etc/rc2.d (i think, iam not sure about HP)
# 6  
Old 10-24-2002
thanks, janr...
i couldnt find those files..
i even do a find /, ya... to confirm the location of these files..
yls177
# 7  
Old 10-24-2002
HP-UX depends on the version.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Start a service manager process automatically on startup

Hello, I am in the process of learning Linux OS. How do I run the below lines of code automatically as root on server startup. cd /opt/program_folder/ServiceManager/bin nohup ./servce_manager DEV & Currently, as soon as the server is up and running I log in as root (as this... (6 Replies)
Discussion started by: rparavastu
6 Replies

2. Solaris

run a service via startup script (correct me if I am wrong)

Environment Solaris 9 I have configured the Solaris9 as NTP client in which Solaris9 is syncing the time with a windows2008 R2 Server which is runing fine. Now I want that the xntpd service should start at startup. I did this via a script. Kindly correct if I did any thing wrong: 1.)Made... (9 Replies)
Discussion started by: z_haseeb
9 Replies

3. Shell Programming and Scripting

how to delete files at booting of system (system startup)

hi all I have a problem how to write a shell script which delete files/folder form directory whenever system boot and copy last updated folder/file in the specified directory.pse help me ASAP. i write a script which copy files in directory.I want when system boot up using script it check whether... (1 Reply)
Discussion started by: shubhig15
1 Replies

4. UNIX for Dummies Questions & Answers

Starting a service at startup.

Hi guys I want to start a service and a script SiteMonitor.sh at startup. To start with i have modified /etc/rc.local file. Here is the content of my /etc/rc.local file. #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own... (3 Replies)
Discussion started by: pinga123
3 Replies

5. Solaris

Mountall error at system startup

Hi I have SVM on my Solaris 10 5/08 SPARC with the following configuration: d1: Mirror Submirror 0: d11 State: Okay Submirror 1: d12 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size:... (2 Replies)
Discussion started by: Sapfeer
2 Replies

6. Solaris

StartUP file to start a service

Hi guys: i have a Solaris 10 development server and a Solaris 9 production server. The entire task must be done in the dev. server. When it's done and all the testing is OK, the script or files are transfer to prod. Server. All right. Now I have to figure out a way to put a script to initiate... (2 Replies)
Discussion started by: bmathiasf
2 Replies

7. AIX

service/process management -autostart at startup

Hi, I want to modify some of the services/processes (related to the oracle database) to start automatically at the startup of the server. which commands may help me? which commands do I need to use? my server configuration is, in brief: hardware:IBM P550 / OS : AIX 5300 thanks,... (1 Reply)
Discussion started by: talipk
1 Replies

8. AIX

Creating startup service for JBoss

Hello Friends, Does anyone know how to create a startup script for Jboss on IBM AIX 5.3? Please help me, I'd be highly grateful to you... Thanks & Regards, Vinit (0 Replies)
Discussion started by: vpatil6688
0 Replies

9. UNIX for Advanced & Expert Users

AIX 5.3: Start Service on System startup

Hi, I'm new to AIX, and have to make some services start at system startup. The IBM-Redbook says I have to edit /etc/inittab. As a long time (Debian)-Linux Admin I'm a bit confused. Is there something like /etc/init.d/$SERVICE in AIX? Greetings, Dennis (1 Reply)
Discussion started by: dennis.kuehl
1 Replies

10. UNIX for Dummies Questions & Answers

System Startup Time

Hi all, Can anyone tell me how to find the System Startup time. Currently I am using "who -b" to get last reboot time. I wanted to know is there any log file for SCO Openserver 5, in which all this sort of imformations are kept. I have tried searching the forum with words like "WHO... (6 Replies)
Discussion started by: shoeb_syed
6 Replies
Login or Register to Ask a Question