03-09-2007
You could do something like this:
1. Create your webserver startup script to handle start and stop as arguments
2. Create a link in the rc3.d directory as S99<script_name> that points to your startup script and a link in rc0.d as S00<script_name> that points to the same script.
When the system shuts down or boots up, the links in the rc directories will invoke your script to start/stop the webserver.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
guys/gals...does anyone have a startup shell script for oracle/sybase...meaning at shutdown the databases stop themselves and at start up they start automatically...thanks much... (3 Replies)
Discussion started by: suntan
3 Replies
2. UNIX for Dummies Questions & Answers
I'm a newbie to the Unix world Help!
I have to maintain a host of Sybase database servers sitting on Unix Sun Solaris 8...I've been tasked with finding/creating a way to auto start/stop Unix via unix commands, specifically when the Unix servers need to be restarted we want Sybase to start... (2 Replies)
Discussion started by: jjv1
2 Replies
3. Shell Programming and Scripting
Hello all,
im quite new to linux and was wonder if there was a way to start a script e.g. ./script1 on another tty
for example im on /dev/pts/0 and i want to start a script called ./script1 on /dev/pts/1 but without actually typing directly into pts1 only into pts0 :)
how would i go about... (1 Reply)
Discussion started by: moka
1 Replies
4. UNIX Desktop Questions & Answers
I am using a Mandrake spinoff (PCLinux) and would like to have a yakuake terminal started
when I launch xwin. Where is the start up script?
Thanks JZ (2 Replies)
Discussion started by: jwzumwalt
2 Replies
5. Shell Programming and Scripting
Hey!
I'm working on a script that will add a user, create some configfiles, and add a crontab for the user.
The crontab looks like the following:
@reboot /home/user/program config.conf &
I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies
6. Shell Programming and Scripting
I apologize if this is in the incorrect section, I'm not quite sure which section it should go in.
Anyways...
I've got a script that I'd like to be able to start with a webpage, something that just has a button that says "Start this Bot", which will start the bot and put it in the background.... (4 Replies)
Discussion started by: JoeGazz84
4 Replies
7. Shell Programming and Scripting
Hi all
I want to put this script on start-up the sh Terminal to save history of output:
if ; then
logdir=$HOME/terminal-logs
if ; then
mkdir $logdir
fi
gzip -q $logdir/*.log
logfile=$logdir/$(date +%F_%T).$$.log
... (12 Replies)
Discussion started by: Rahim_T
12 Replies
8. Shell Programming and Scripting
Hi All,
I'm trying to build a start up script, wud be gr8 if any one can explain what the below field means and how can i check it for my script.
DAEMON_PATH="/home/wes/Development/projects/myapp"
DAEMON=myapp
DAEMONOPTS="-my opts"
NAME=myapp
DESC="My daemon description"... (4 Replies)
Discussion started by: Karthick N
4 Replies
9. Shell Programming and Scripting
Hi
I want to create a script to be able to check if a process is running and act on it. Essentially I want to:
Check acc process status /opt/ca/APMCommandCenterController./apmccctrl.sh status
If process found not to be running
Execute start command... (6 Replies)
Discussion started by: simpsa27
6 Replies
10. UNIX for Advanced & Expert Users
Hi,
systemd cant start my script, but it work, at command prompt.
Code and execute at command prompt
#cat collector.sh
#!/bin/bash
case $1 in
start)
/home/postgres/scripts/pgwatch2/pgwatch2.sh
/home/postgres/scripts/pgwatch2/pgwatch2_UI.sh
;;
... (7 Replies)
Discussion started by: kvaikla
7 Replies
LEARN ABOUT SUNOS
smcwebserver
smcwebserver(1M) System Administration Commands smcwebserver(1M)
NAME
smcwebserver - manage the server for the Sun Web Console
SYNOPSIS
/usr/sbin/smcwebserver subcommand options
DESCRIPTION
The smcwebserver utility manages the Sun Web Console server. Sun Web Console is a browser-based interface that performs systems management.
System administrators can manage systems, devices and services from the console.
When the console webserver is running, you can view the console by opening a browser and pointing to:
https://host:6789
host is the machine where the console has been installed and the console server is running.
SUBCOMMANDS
The following subcommands are supported:
disable Disable automatic start or stop during system boot or shutdown. Until the administrator reruns the script with the smcweb-
server enable subcommand the webserver can be started/stopped only when the administrator executes the script manually
using the following command:
# /usr/sbin/smcwebserver [start | stop]
enable Enable the webserver to startup automatically during subsequent system boot and gracefully stop during system shutdown.
restart Stop and subsequently start the console webserver.
The format of the restart subcommand is:
restart [-U username]
start Start the console webserver.
The format of the start subcommand is:
start [-U username]
stop Stop the console webserver.
status Display status of the console webserver.
The format of the status subcommand is:
status [-p]
OPTIONS
The following options are supported:
-U username | --username usernamThe user identity to run the server as. Once the server has successfuly started under the specified iden-
tity, all subsequent starts will automatically be done under that identity until you change it via this
option, or by changing the com.sun.web.console.user configuration property via the smreg(1M) command. The
default is to run the server under the "noaccess" identity.
-p | --parseable Display non-localized output suitable for programmatic parsing. If the server is running, the output will
be:
running=yes
If the server is not running, the output will be:
running=no
-h | --help | -? Display the usage statement.
-V | --version Display console version information.
EXAMPLES
Example 1: Displaying the Usage Statement
The following command displays the smcwebserver usage statement:
% smcwebserver --help
Example 2: Determining if the Server is Running
The following shell command will start the server if it is not already running.
ans=`smcwebserver -p | grep running | cut -d"=" -f2`
if [ "$ans" = "no" ]; then
smcwebserver start
fi
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of smcwebserver:
JAVA_HOME
If you do not specify this environment variable, your PATH is searched for a suitable java. Otherwise, depending on the OS, the follow-
ing default locations are used:
Solaris: /usr/j2se
Linux: /usr/java/j2sdk1.4*
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWmcon |
+-----------------------------+-----------------------------+
SEE ALSO
smreg(1M), attributes(5), environ(5)
SunOS 5.10 27 May 2004 smcwebserver(1M)