六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 301|回复: 0

sphinx启动脚本

[复制链接]

升级  16.2%

179

主题

179

主题

179

主题

进士

Rank: 4

积分
581
 楼主| 发表于 2013-1-30 01:36:46 | 显示全部楼层 |阅读模式
#!/bin/sh# sphinx: Startup script for Sphinx search## chkconfig: 345 86 14# description:  This is a daemon for high performance full text \#               search of MySQL and PostgreSQL databases. \#               See http://www.sphinxsearch.com/ for more info.## processname: searchd# pidfile: $sphinxlocation/var/log/searchd.pid # Source function library.. /etc/rc.d/init.d/functions processname=searchdservicename=sphinxusername=sphinxsphinxlocation=/usr/local/sphinxpidfile=$sphinxlocation/var/log/searchd.pidsearchd=$sphinxlocation/bin/searchd RETVAL=0 PATH=$PATH:$sphinxlocation/bin start() {    echo -n $"Starting Sphinx daemon: "    daemon --user=$username --check $servicename $processname    RETVAL=$?    echo    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename} stop() {    echo -n $"Stopping Sphinx daemon: "     $searchd --stop    #killproc -p $pidfile $servicename -TERM    RETVAL=$?    echo    if [ $RETVAL -eq 0 ]; then        rm -f /var/lock/subsys/$servicename        rm -f $pidfile    fi} # See how we were called.case "$1" in    start)        start        ;;    stop)        stop        ;;    status)        status $processname        RETVAL=$?        ;;    restart)        stopsleep 3        start        ;;    condrestart)        if [ -f /var/lock/subsys/$servicename ]; then            stop    sleep 3            start        fi        ;;    *)        echo $"Usage: $0 {start|stop|status|restart|condrestart}"        ;;esacexit $RETVAL
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表