马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?站点注册
×
脚本如下 机子启动的时候主服务和备份服务都能起起来,执行service sybase stop 时 主服务能正常关闭,而备份服务还在运行,怎么样才能把备份服务关掉, srvid srvstatus srvname srvnetname srvclass srvsecmech srvcost ----------- ----------- ------- ---------- ----------- ---------- ----------- 0 8 SYBASE SYBASE 0 NULL 0 1 8 SYB_BACKUP SYBASE_BS NULL NULL NULL
- #!/bin/bash<br/># chkconfig: 2345 81 31<br/># description: sybase start&stop script name sybase<br/># Source function library.<br/>. /etc/rc.d/init.d/functions<br/>echo "use master" > shut.sh<br/>echo "go" >> shut.sh<br/>echo "shutdown SYB_BACKUP" >> shut.sh<br/>echo "go" >> shut.sh<br/>echo "shutdown" > shut1.sh<br/>echo "go" >> shut1.sh<br/>case "$1" in<br/> start)<br/> echo "start sybase sever"<br/> exec su - sybase -c "/opt/sybase/ASE-12_5/install/startserver -f<br/> /opt/sybase/ASE-12_5/install/RUN_SYBASE " > /dev/null &<br/> exec su - sybase -c "/opt/sybase/ASE-12_5/install/startserver -f<br/> /opt/sybase/ASE-12_5/install/RUN_SYBASE_BS" > /dev/null &<br/> ;;<br/> stop)<br/> echo "stop sybase server"<br/> exec su - sybase -c "isql -Usa -P -ishut.sh"<br/> exec su - sybase -c "isql -Usa -P -ishut1.sh"<br/> exec rm -rf shut.sh<br/> exec rm -rf shut1.sh<br/> ;;<br/>esac<br/>exit<br/>
复制代码 |