File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Initscript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Initscript" Watch "Initscript" New topic


John Ahmadi

Joined: Oct 24, 2005
Posts: 5

We've Weblogic in our Linux server.I can start Admin server manually by using an script "". But now I have been asked to start admin server while system boots. So I need to write an script for that and put it in /etc/init.d/rc3.d.
I have no idea whatsoever how should I do it.

Any help?

Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

a) copy your script to /etc/init.d/
b) create a symbolic link like this:

The S means it is a start-script.
The number (95) is responsible to define the execution-order.
Smaller numbers indicate: execute first.

You should be sure that services, startWebLogic depends on, are executed first (like mounted filesystems, established network-connections).
System-variables like 'JAVA_HOME' used in the script might not be defined. Then replace them with absolut values.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

I don't think I'd recommend simply aliasing to WebLogic's startup script as an initscript. Technically, that's all right, but I don't think is written to function well in that role.

An industrial-grade initscript has certain properties. It usually has a case statement at its heart where the start, stop, restart, and status (more or less) command functions are defined. It may look outside itself for environmental info (/etc/sysconfig for redhat, /etc/default for Debian and Solaris), so that site-local config options don't touch executable code (and so that multiple instances of the server are possible). Also, there are certain "magic comments" that programs such as RedHat's chkconfig utility can use to construct the S/K runlevel aliases.

I recommend looking at some of the existing /etc/init.d scripts for ideas and creating a script that invokes the weblogic startup script in a similar way. Although first, I'd check around for some existing WebLogic initscript implementations. WebLogic's been running on Linux and Solaris for years, so there's almost certainly something out there.

An IDE is no substitute for an Intelligent Developer.
John Ahmadi

Joined: Oct 24, 2005
Posts: 5

Thank all of you. Although I try to find some existing weblogic script in many places, But I failed, I've beeter idea and that is, I send you here the startup weblogic script. please have a look and if you guys have some idea that how can i change the script let me know. Here is a code:

I agree. Here's the link:
subject: Initscript
It's not a secret anymore!