We have a startup script on one of our Solaris servers and it boots and shuts down our environment for one of our application using oracle.
This morning when the server was booted up, it did not start,
My Platform specialist says that it didn’t start because it is a KSH script instead of a SH startup script.
What are the changes need to comply with him.
Here is the script in question :
#!/bin/ksh
hostName=`/usr/ucb/hostname`
case $1 in
start)
case $hostName in
csdsolid)
. /appl/solid/test/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/test/cur/adm
in/bin/dbproc.boot ostl235' & > /tmp/dbproc_235`date +"%m%d"`_err 2>&1 ;;
psdev09)
. /appl/solid/test/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/test/cur/adm
in/bin/dbproc.boot opwk33' & > /tmp/dbproc_33`date +"%m%d"`_err 2>&1 ;;
fsp8015a|ssp8002a)
. /appl/solid/prod/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/prod/cur/adm
in/bin/dbproc.boot ofar15' & > /tmp/dbproc_15`date +"%m%d"`_err 2>&1 ;;
esac ;;
stop)
case $hostName in
csdsolid)
. /appl/solid/test/sdreport/.profile
su - sdreport -c '/appl/solid/test/cur/admin/bin
/dbproc.shutdown ostl235' > /tmp/dbproc_235`date +"$m%d"`_err 2>&1 ;;
psdev09)
. /appl/solid/test/sdreport/.profile
su - sdreport -c '/appl/solid/test/cur/admin/bin
/dbproc.shutdown opwk33' > /tmp/dbproc_33`date +"$m%d"`_err 2>&1 ;;
fsp8015a|ssp8002a)
. /appl/solid/prod/sdreport/.profile
su - sdreport -c '/appl/solid/prod/cur/admin/bin
/dbproc.shutdown ofar15' > /tmp/dbproc_15`date +"$m%d"`_err 2>&1 ;;
esac ;;
*)
echo "Usage: /etc/init.d/dbproc {start|stop}" ;;
esac
Thanks to all the nice samaritans.
This morning when the server was booted up, it did not start,
My Platform specialist says that it didn’t start because it is a KSH script instead of a SH startup script.
What are the changes need to comply with him.
Here is the script in question :
#!/bin/ksh
hostName=`/usr/ucb/hostname`
case $1 in
start)
case $hostName in
csdsolid)
. /appl/solid/test/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/test/cur/adm
in/bin/dbproc.boot ostl235' & > /tmp/dbproc_235`date +"%m%d"`_err 2>&1 ;;
psdev09)
. /appl/solid/test/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/test/cur/adm
in/bin/dbproc.boot opwk33' & > /tmp/dbproc_33`date +"%m%d"`_err 2>&1 ;;
fsp8015a|ssp8002a)
. /appl/solid/prod/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/prod/cur/adm
in/bin/dbproc.boot ofar15' & > /tmp/dbproc_15`date +"%m%d"`_err 2>&1 ;;
esac ;;
stop)
case $hostName in
csdsolid)
. /appl/solid/test/sdreport/.profile
su - sdreport -c '/appl/solid/test/cur/admin/bin
/dbproc.shutdown ostl235' > /tmp/dbproc_235`date +"$m%d"`_err 2>&1 ;;
psdev09)
. /appl/solid/test/sdreport/.profile
su - sdreport -c '/appl/solid/test/cur/admin/bin
/dbproc.shutdown opwk33' > /tmp/dbproc_33`date +"$m%d"`_err 2>&1 ;;
fsp8015a|ssp8002a)
. /appl/solid/prod/sdreport/.profile
su - sdreport -c '/appl/solid/prod/cur/admin/bin
/dbproc.shutdown ofar15' > /tmp/dbproc_15`date +"$m%d"`_err 2>&1 ;;
esac ;;
*)
echo "Usage: /etc/init.d/dbproc {start|stop}" ;;
esac
Thanks to all the nice samaritans.