Hi all, im pretty new to unit/redhat 6.2
I am trying to load a script upon startup of my redhat 6.2
(instance in ec2 AWS if someone cares)
I want everytime when instance starts (after stop/reboot) a script i build to launch. when i run the script ./scriptname the script runs and everything is OK.
i added the following lines to /etc/rc.local by using "sudo vi /etc/local.rc"
Then i saved and exited.
then i stopped the instance, started it, and it does not perform the script.
if i do /etc/rc.local when i am logged it, it will apply it good..
Does rc.local is the proper place to put the command ?
Do i need to chmod the file after modifiying ?
I also tried to put it in chkconfig, to add the script, and it added it, but still does not run it on startup.
thanks
Last edited by Scrutinizer; 05-10-2012 at 06:50 PM..
/etc/rc.local is executed only once during server boot. To run your script when the application is being started, you should add it to the application's start script. How are you starting the instance?
Hi again,
i debugged my problem, meaning i cat /var/log/boot.log
and saw:
meaning, i guess, that system does not know what is ec2-associate-address during the time of starting services..
Why is that ? how can i bypass it ?
after im logged in from putty, if i ec2-associate-address then the command is known and working.
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)
Great tins massive!
Im Manqoba from Midrand, South Africa...
I have installed Apache and PHP on a solaris 9 box, using the packages below:
apache-2.2.14-sol9-sparc-local
php-5.2.13-sol9-sparc-local
After installing the packages I edited my httpd.conf file, to load the php5 module when... (10 Replies)
Hi All,
O/S: Solaris 5.10
Software installed :-
Oracle 10G
Weblogic 10.30
the problem i face that
when the server restart for any reason
SQL> exit
bash-3.00# sqlplus sys/manchester as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 2 11:04:50 2010
Copyright (c)... (3 Replies)
I am trying to use 'cut' to get a line from my file. But it seems that 'cut' recongnizes TAB as default. My file uses space instead. So 'cut' doesn't work.
Anybody can tell me how to change the default from TAB to space ? Or how to transform a space-delimited file into tab-delimited file??... (2 Replies)
I have a machine running HP-UX 11.23 (PARISC) and APA startup fails on boot. This is found in /etc/rc.log:
Configure Auto-Port Aggregation(LAN Monitor) interfaces
Output from "/sbin/rc2.d/S343hplm start":
----------------------------
get_start_dlpi_version: failed, errno is 22
ERROR: ... (1 Reply)
Hi All,
I am facing a while i use mput to the server.
Actually i have data on client machine which is windows XP. The data is near to 1GB. I have zipped the data.
I can ftp and connect to Server(Which has Fedora 4 running).
but when i do mput *.zip it gives an error.
I tried to put in a... (2 Replies)
Hello Everyone!
changing from Microsoft to Macintosh, I connected my hard disk (nearly full) to the apple computer, which could not recognize it. I was prompt to "initialize it", unfortunately I DECIDED YES!!, but just for 1/100 of a second: now I cannot access the hard disk at all.
Is still... (1 Reply)
okay so I just started this unix class and understood all the test questions but this "normal" question threy me through a loop :confused:. The question is Why are UNIX commands noninteractive and why is their output not usually preceededby header information? This question has been driving me... (2 Replies)
:confused: Hi, 2 questions to get some insight. Thanks
(1) I would like to add a prefix (XX00) in each row of the line in my text file and save a newly generated file another name. How to go about it.
(2) How to insert a blank line into each row in my file. and save the file another name.... (2 Replies)