博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
71.7. Script for automatic startup on boot
阅读量:7219 次
发布时间:2019-06-29

本文共 1068 字,大约阅读时间需要 3 分钟。

 

#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance
ORA_HOME="/u01/app/oracle/product/9.2.0.1.0"
ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
        echo "Oracle startup: cannot start"
        exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
    start)
        # Oracle listener and instance startup
        echo -n "Starting Oracle: "
        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
        su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
        touch /var/lock/subsys/oracle
        echo "OK"
        ;;
    stop)
        # Oracle listener and instance shutdown
        echo -n "Shutdown Oracle: "
        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
        su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
        rm -f /var/lock/subsys/oracle
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: $0 start|stop|restart|reload"
        exit 1
esac
exit 0
  
 

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章
锤子科技官方首页的特效
查看>>
C# MarshalByRefObject 和Serializable的区别
查看>>
启动Hadoop HA Hbase zookeeper spark
查看>>
SDWebImage源码解读 之 UIImage+GIF
查看>>
pg_dump实例详解(备份postgresql和greenplum数据库)
查看>>
前端学HTTP之报文首部
查看>>
[充电]多线程无锁编程--原子计数操作:__sync_fetch_and_add等12个操作
查看>>
linux系统中如何查看日志(转)
查看>>
谈谈常用清除浮动的方法
查看>>
Atitit opencv 模板匹配
查看>>
JavaScript的parseint()函数
查看>>
shell脚本,根据字符串获取行号的
查看>>
Docker学习笔记 - Docker容器与外部网络的连接
查看>>
Codeforces Round #396 (Div. 2) D. Mahmoud and a Dictionary 并查集
查看>>
微信小程序 view 布局
查看>>
一步一步学Python(2) 连接多台主机执行脚本
查看>>
【AUC】二分类模型的评价指标ROC Curve
查看>>
Android井字游戏(一)首页制作
查看>>
VM虚拟机安装之后出现无法自动登录到桌面以及__vmware_user__怎么办
查看>>
QTcpSocket的连续发送数据和连续接收数据
查看>>