creating a service in init.d


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users creating a service in init.d
# 1  
Old 09-10-2004
Question creating a service in init.d

Hai Friends

I have written a DayTime server program using C socket.. I need to start the service automatically. My service directory is /etc/rc.d/init.d... my service name is DayTime present in /home/codebase/datetime/ directory.. Please help me

Smilie Smilie Smilie
Thanks in advance
# 2  
Old 09-30-2004
What OS and version???

See your man page for init.d and/or inittab


Example of change to inittab to start process via init.d:
v1:3:respawn:/opt/nms/vspan/vstail /opt/OV/log/trapd.log
# 3  
Old 09-30-2004
Or else, place a "control" script in /etc/rc.d/init.d (look at the others to see how they're constructed), and then put the appropriate K* and S* symlinks in the runlevel directories.

As RTM says, OS and version please!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Restart service xinit.d or init.d ?

Hello How do I restart init.d ?? (centos 6.5) Thanks (2 Replies)
Discussion started by: mnnn
2 Replies

2. Red Hat

init-script failing because of /etc/rc.d/init.d/functions

I encountered a problem on one of our database servers. OS: CentOS 5.5 final Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel) We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Discussion started by: bakunin
1 Replies

3. UNIX for Advanced & Expert Users

Problem on init 0, execution is the same with init 6

Hi, I am experiencing a weird thing on my SUNFIRE machine with Solaris 9 OS. When I do init 0 to shutdown the machine to go to ok prompt, what it did was shutdown and reboot like an init 6 command do. I did check the corresponding rc scripts that were involved with init 0 and compared with rc... (2 Replies)
Discussion started by: Yenthanh
2 Replies

4. Linux

How to I change init levels after typing init 1

Dear all, I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel): 1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Discussion started by: z1dane
8 Replies

5. Solaris

creating service in sun solaris

hi, any body have a idea how to create a service in sunsolaries(like windows).is it possible to create a service?.if any body having idea help me? regards suresh (3 Replies)
Discussion started by: suresh_rtp
3 Replies

6. 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

7. Shell Programming and Scripting

error in init script of dnotify service

fallowing code is for init script for dnotify service # !/bin/bash # DESCRIPTION #Process name-dnotify # Dnotify startup script:- # Init/rc scripts are bash scripts used to manage services like dnotify. # Dnotify (directory notification) is a utility for monitoring filesystem... (0 Replies)
Discussion started by: pankajd
0 Replies

8. Tips and Tutorials

Creating a Solaris10 service

The general steps required are: o Determine the proccess for starting and stopping your service. o Establish a name for the service, and the category this service falls into. o Determine whether your service runs multiple instances. o Identify any dependency relationships between this service... (0 Replies)
Discussion started by: Tornado
0 Replies

9. UNIX for Advanced & Expert Users

Init 6 & Init 0 problem

Hi Expert, I have encountered some problem with my SUN system. Everytime when i issue command #init 6 OR #init 0 it just logout and prompt for login again instead of rebooting the server when run init 6 and system shutdown when run init 0.. I can only reboot the system using reboot ... Was... (6 Replies)
Discussion started by: sc2005
6 Replies
Login or Register to Ask a Question