sybase 启动和关闭脚本的问题
<p>脚本如下 机子启动的时候主服务和备份服务都能起起来,执行service sybase stop 时 主服务能正常关闭,而备份服务还在运行,怎么样才能把备份服务关掉,</p><p>srvid srvstatus srvname srvnetname srvclass srvsecmech srvcost <br/>----------- ----------- ------- ---------- ----------- ---------- ----------- <br/> 0 8 SYBASE SYBASE 0 NULL 0 <br/> 1 8 SYB_BACKUP SYBASE_BS NULL NULL NULL <br/></p><p>#!/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/></p><p></p>
页:
[1]