Sponsored Content
Full Discussion: Startup script and services
Operating Systems AIX Startup script and services Post 302370484 by bakunin on Wednesday 11th of November 2009 03:20:06 PM
Old 11-11-2009
zxmaus is correct - in fact it is IMHO a rather bad practice to start applications from the inittab, where only the basic system should be started. Applications should be started from S-scripts and stopped from analogous K-scripts in /etc/rc* - this is the very reason the /etc/rc* does exist in fact.

And this is what i am getting at, for reasons of completeness: even if zxmaus didn't mention it, create a corresponding K-script for every S-script you create lest you get troubles using the init/telinit command to switch runlevels.

Entering a new runlevel is done by first running all the K-scripts of the current runlevel, then entering the new runlevel and first thing running all the S-scripts of the new runlevel. If there is a S-script without a corresponding K-script the started process will be left over.

Btw.. the order of the K-/S-scripts being run is alphabetical - this is why they are usually numbered S01-S99/K01-K99 - to enforce a certain order should that be necessary.

I hope this helps.

bakunin
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Startup script

New in Unix, I am adding a line "route add 57.14.y.y 57.14.x.x" every day after rebooting the system. Where can I add the line so during boot up (the system is re-started every day by design (???) the line is executed? (I tried the /etc/rc2.d/S90 but for some reason the line needs to be added... (2 Replies)
Discussion started by: texaspanama
2 Replies

2. SuSE

start services during the startup

I'm trying to add services to start services automatically during the system start up in suse linux. I followed these steps.. chkconfig servicename on and created symbolic link at /etc/rc.d/rc3.d/ folder with name S80servicename. here is the command I used ln -s /etc/init.d/servicename... (8 Replies)
Discussion started by: s_linux
8 Replies

3. UNIX for Dummies Questions & Answers

Startup Script Somewhere ?

Hello there! I need help. Everytime I login to my ssh, i see this: -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found any help ? thanks (0 Replies)
Discussion started by: fbauto1
0 Replies

4. UNIX for Dummies Questions & Answers

run a script at startup

hi, i am using rhel 5, and i wanna run a script as soon as the operating system open. How can i do this ? ( i was reading rc.d files but i could not understand exactly what are the run levels and where should i put the my shell script. my script will be : #!/bin/ksh iptables -I INPUT... (1 Reply)
Discussion started by: futi
1 Replies

5. AIX

startup script

Hi I need the below script to be started whenever I reboot my aix server ? #cat cdbegin /cdirect/cdunix/ndm/bin/cdpmgr -i /cdirect/cdunix/ndm/cfg/cbspsdb01/initparm.cfg Please suggest how to add this to the startup ? (2 Replies)
Discussion started by: samsungsamsung
2 Replies

6. Red Hat

Restart of services if port no is changed in /etc/services in RHEL

I had a doubt if any services need to be restarted if port no in /etc/services in an RHEL setup is changed. For eg, the port no of 443 for SSL may need to be changed. I hope my query is clear whether any services need to be restarted if port no in /etc/services is changed. Please revert with... (10 Replies)
Discussion started by: RHCE
10 Replies

7. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies

8. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

9. Shell Programming and Scripting

Startup script

I can't quite find a clear answer on how to properly write a start up script. Does anybody have any ideas?? (3 Replies)
Discussion started by: Huitzilopochtli
3 Replies
dtsd(1m)																  dtsd(1m)

NAME
dtsd - Restarts the DTS daemon SYNOPSIS
dtsd [options] [-d] [-w serviceability] dtsd [-s [-k courier|noncourier] [-g] [-o]] dtsd -c ARGUMENTS
Debug mode. The command will run in the foreground. See svcroute(5) for the full description of the appropriate format for this entry. Only the three-field format, severity:how:where, is used. An example is: FATAL:TEXTFILE:/dev/console Run as a server. Default is backup, courier, local server Run dtsd as a global server. Run dtsd as a courier. Run dtsd as a noncourier. When enabling as a server, set the clock immediately. Equivalent to the command enable set clock true in dtscp or to the command dcecp dts activate -abruptly. Run dtsd as a clerk. DESCRIPTION
The dtsd command invokes the DTS daemon (clerk or server process). This command is usually executed as part of the overall DCE startup script, rc.dce. You can enter the command manually under the following conditions: If a DTS daemon fails to start automatically upon reboot If you want to restart a daemon that you shut down to perform a backup or do diagnostic work In normal rebooting, the rc.dce script automatically provides arguments appropriate to the choice of configuration options. The command line arguments shown here can also be provided to dced as part of the fixed configuration strings, if dced is configured to automatically start the dtsd. If dtsd is started with no arguments (other than -d and -w), then the server must be started with dcecp. The following example configures a local server: dcecp> dts configure -notglobal dcecp> dts activate Privilege Required DTS runs as the host machine principal, which is usually root. See the Security reference pages for information about principals. NOTES
Use dtsd interactively only when troubleshooting; use the rc.dce script to start the DTS daemon. On some systsems the superuser is associ- ated with the machine principal. EXAMPLES
To restart the daemon, follow these steps: Log in to the system as superuser (root). Use the ps command to make sure that dced and cdsadv are running. (The DCE daemon provides the endpoint mapping and security services, and cdsadv provides CDS.) Enter the following command to restart the dts daemon as a clerk: $ dtsd -c To restart the dts daemon as a server, use dtsd -s and to restart it as a global server, setting the clock on startup, use dtsd -s -g -o RELATED INFORMATION
Commands: dtscp(1m), dtsdate(1m), dcecp(1m). Books: OSF DCE Administration Guide dtsd(1m)
All times are GMT -4. The time now is 06:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy