he there, trying to hack up a little bash script to shut down and bring back
up the oracle monitoring and maintenance tools on linux
( because they crash so often ( 10g is really alpha ... as in quality rather
than top of the pack ) ) ... anyhow it's a while since i've
done any bash scripting and it seems there is a slight problem with the
script.
The reason I'm running the function asynchronsly is because
a) The commands take such an incredibly long time to run ( even on a brand
new server )
b) I would like to run it as a nightly job perhaps.
anyhow the email contains the following .,.....
/usr/bin/nohup: line 79: exec: restartoraclegui: not found
Perhaps I am trying a completely wrong approach here, i also considered
using this line
then ( restartoraclegui | mail admin\@revoltingdigits.com -s "oracle gui
restart" 2>&1 )
Any bashers in here got any ideas ?
Thanks
Bryan
snip=
#!/bin/sh
restartoraclegui () {
${ORACLE_HOME}/bin/isqlplusctl stop;
${ORACLE_HOME}/bin/emctl stop dbconsole;
${ORACLE_HOME}/bin/isqlplusctl start;
${ORACLE_HOME}/bin/emctl start dbconsole;
}
var=`whoami` ;
if [ "$var" = "oracle" ];
then nohup restartoraclegui | mail admin\@revoltingdigits.com -s "oracle gui
restart" 2>&1 &
else
echo "you have to be logged on as oracle user to run this script";exit 1;
fi
=snip
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!