-
-
Save iacosta/cc26913fdae34d7cbc7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# oracle Start/Stop Service OFW and Weblogic...By Ivan Acosta | |
# | |
# chkconfig: - 99 10 | |
# description: oracle upstart | |
# processname: oracle | |
# Source function library. | |
. /etc/init.d/functions | |
RETVAL=0 | |
ORA_OWNER="oracle" | |
SER_HOME="/home/oracle" | |
prog="oracle" | |
start(){ | |
echo -n $"Iniciando Servicios...! $prog: " | |
su - $ORA_OWNER -c "sh $SER_HOME/bin/start_11gFMW_inb_server.sh" | |
echo "Funciona correctamente..!" | |
RETVAL=$? | |
echo | |
[ $RETVAL -eq 0 ] && touch /home/oracle/bin/start_11gFMW_inb_server.out | |
return $RETVAL | |
} | |
status() { | |
echo -n $"Estado de Servicios...! $prog: " | |
su - $ORA_OWNER -c "sh $SER_HOME/bin/status_11gFMW_inb_server.sh" | |
su - $ORA_OWNER -c "sh $SER_HOME/bin/start_rep_test_1.sh" | |
RETVAL=$? | |
echo | |
[ $RETVAL -eq 0 ] && touch /home/oracle/bin/status_11gFMW_inb_server.out | |
return $RETVAL | |
} | |
stop() { | |
echo -n "Bajando Servicios...! $prog: " | |
su - $ORA_OWNER -c "sh $SER_HOME/bin/stop_11gFMW_inb_server.sh" | |
echo -n "Funciona correctamente..!" | |
RETVAL=$? | |
echo | |
[ $RETVAL -eq 0 ] && touch /home/oracle/bin/stop_11gFMW_inb_server.out | |
return $RETVAL | |
} | |
restart() { | |
stop | |
start | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
status) | |
status | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
restart | |
;; | |
*) | |
echo $"Usage: $0 {start|stop|restart|status}" | |
exit 1 | |
esac | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment