need to shutdown oracle when shutdown command is sent to server
Hello,
When we are shutting down out linux server that has Oracle it takes for ever. I found out if I stop the Oracle services the server shutdowns nice and fast.
So I did the following
wrote a quick bash script that would shut down the services
stop_oracle.sh
!/usr/bin/env bash
LOGDIR=/var/log/admins/ # Group logs into a shared directory for each
LOG=${LOGDIR}/${SCRIPT}_${FILEDATETIME}.log
systemctl stop wls_adminserver.service
systemctl stop wls_nodemanager.service
systemctl stop wls_managedserver_WLS_FORMS.service
systemctl stop wls_managedserver_WLS_REPORTS.service
systemctl stop wls_WebTier.service
oracle_status=$(systemctl status wls_adminserver.service | grep "Active:")
echo ${oracle_status} > $LOG
END
Then I copied it without .sh to
cp stop-oracle.sh /etc/init.d/stop-oracle
made it executable
chmod +x /etc/init.d/stop-oracle
But how can I tell RHEL to run this when doing a shutdown/reboot ?
Responses