Sponsored Content
Full Discussion: Start Up Script
Top Forums UNIX for Dummies Questions & Answers Start Up Script Post 4192 by suntan on Friday 20th of July 2001 10:46:54 AM
Old 07-20-2001
Java Start Up Script

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

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Start/Stop Script

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

2. Shell Programming and Scripting

Start up script

Hello, I have a script that starts a type of web server that I need to get to start up at startup, I would like to keep the current script in its directory and not stick it in the rc directorys. So really I want a shell script that will execute the web server script at startup. I dont really... (1 Reply)
Discussion started by: Mr Pink
1 Replies

3. Shell Programming and Scripting

start a script from another tty

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

Where is xwindow start script

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

Start program in background (or start crontab ahead of time)

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

Use Webpage to Start Script

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

Put Script on Start-up the sh Terminal

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

Start up init d script

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

Script to start process

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

Systemd cant start my script

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
RC(8)							    BSD System Manager's Manual 						     RC(8)

NAME
rc, rc.local, rc.shutdown, rc.d/ -- startup and shutdown scripts SYNOPSIS
rc rc.local rc.shutdown rc.d/ DESCRIPTION
rc is the command script which controls the startup of various services, and is invoked by init(8) as part of the process of entering the automatic reboot to multi-user startup, or after the single user mode shell has exited. If init(8) is starting the automatic reboot process, rc is invoked with the argument of 'autoboot'. rc.local is a command script to which local boot-time actions can be added. It is (nearly) the last thing invoked by rc during a normal boot. rc.shutdown is the command script which shuts down various services, and is invoked by shutdown(8) as part of the process of shutting down the system. rc.d/ is the directory which contains various sh(1) scripts, one for each service, which are called by rc at startup, rc.shutdown at shut- down, and as necessary during system operation to stop, start, restart, reload, or otherwise control the service. Operation of rc 1. Source /etc/rc.subr to load various rc.subr(8) shell functions to use. 2. If autobooting, set autoboot=yes and enable a flag (rc_fast=yes), which prevents the rc.d scripts from performing the check for already running processes (thus speeding up the boot process). This rc_fast=yes speedup won't occur when rc is started up after exiting the single-user shell. 3. Invoke rcorder(8) to order the files in /etc/rc.d/ that do not have a ``nostart'' keyword (refer to rcorder(8)'s -s flag), and assigns the result to a variable. 4. Calls each script in turn using run_rc_script() (from rc.subr(8)), which sets $1 to 'start', and sources the script in a subshell. If the script has a '.sh' suffix then it is sourced directly into the current shell. 5. The output from the above steps is sent to a post-processor. If rc_silent is false, then the post-processor displays the output. If rc_silent is true, then the post-processor invokes the command specified in rc_silent_cmd once for each line, without otherwise display- ing the output. Useful values for rc_silent_cmd include ``:'' to display nothing at all, and ``twiddle'' to display a spinning symbol on the console. Regardless of the value of rc_silent, the post-processor saves the output in /var/run/rc.log. Operation of rc.shutdown 1. Source /etc/rc.subr to load various rc.subr(8) shell functions to use. 2. Invoke rcorder(8) to order the files in /etc/rc.d/ that have a ``shutdown'' keyword (refer to rcorder(8)'s -k flag), reverses that order, and assigns the result to a variable. 3. Calls each script in turn using run_rc_script() (from rc.subr(8)), which sets $1 to 'stop', and sources the script in a subshell. If the script has a '.sh' suffix then it is sourced directly into the current shell. Contents of rc.d/ rc.d/ is located in /etc/rc.d. The following file naming conventions are currently used in rc.d/: ALLUPPERCASE Scripts that are 'placeholders' to ensure that certain operations are performed before others. In order of startup, these are: NETWORKING Ensure basic network services are running, including general network configuration (network) and dhclient. SERVERS Ensure basic services (such as NETWORKING, ppp, syslogd, and kdc) exist for services that start early (such as named), because they're required by DAEMON below. DAEMON Before all general purpose daemons such as dhcpd, lpd, and ntpd. LOGIN Before user login services (inetd, telnetd, rshd, sshd, and xdm), as well as before services which might run commands as users (cron, postfix, and sendmail). foo.sh Scripts that are to be sourced into the current shell rather than a subshell have a '.sh' suffix. Extreme care must be taken in using this, as the startup sequence will terminate if the script does. /etc/rc.d/bootconf.sh uses this behav- iour to allow the user to select a different configuration (including /etc/rc.conf) early in the boot. bar Scripts that are sourced in a subshell. The boot does not stop if such a script terminates with a non-zero status, but a script can stop the boot if necessary by invoking the stop_boot() function (from rc.subr(8)). Each script should contain rcorder(8) keywords, especially an appropriate ``PROVIDE'' entry. The scripts are expected to support at least the following arguments: start Start the service. This should check that the service is to be started as specified by rc.conf(5). Also checks if the ser- vice is already running and refuses to start if it is. This latter check is not performed by standard NetBSD scripts if the system is starting directly to multi-user mode, to speed up the boot process. stop If the service is to be started as specified by rc.conf(5), stop the service. This should check that the service is running and complain if it's not. restart Perform a stop then a start. status If the script starts a process (rather than performing a one-off operation), show the status of the process. Otherwise it's not necessary to support this argument. Defaults to displaying the process ID of the program (if running). poll If the script starts a process (rather than performing a one-off operation), wait for the command to exit. Otherwise it's not necessary to support this argument. rcvar Display which rc.conf(5) variables are used to control the startup of the service (if any). Other arguments (such as 'reload', 'dumpdb', etc) can be added if necessary. The argument may have one of the following prefixes to alter its operation: fast Skip the check for an existing running process. Sets rc_fast=yes. force Skips the rc.conf(5) check, ignores a failure result from any of the prerequisite checks, executes the command, and always returns a zero exit status. Sets rc_force=yes. one Skips the rc.conf(5) check, but performs all other prerequisite tests. In order to simplify scripts, the run_rc_command() function from rc.subr(8) may be used. FILES
/etc/rc Startup script called by init(8). /etc/rc.d/ Directory containing control scripts for each service. /etc/rc.local Local startup script. /etc/rc.shutdown Shutdown script called by shutdown(8). /etc/rc.subr Contains rc.subr(8) functions used by various scripts. /etc/rc.conf System startup configuration file. /var/run/rc.log Log file created by rc. SEE ALSO
rc.conf(5), init(8), rc.subr(8), rcorder(8), reboot(8), shutdown(8) Luke Mewburn, "The Design and Implementation of the NetBSD rc.d system", Proceedings of the FREENIX Track: 2001 USENIX Annual Technical Conference, USENIX Association, http://www.usenix.org/publications/library/proceedings/usenix01/freenix01/full_papers/mewburn/mewburn.pdf, June 25-30, 2001. HISTORY
The rc command appeared in 4.0BSD. The /etc/rc.d support was implemented in NetBSD 1.5 by Luke Mewburn <lukem@NetBSD.org>. The post-proces- sor, support for rc_silent, and saving output to a file, was implemented in NetBSD 6.0 by Alan Barrett. BSD
May 14, 2010 BSD
All times are GMT -4. The time now is 06:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy