商务合作加Q:411239339

AMH脚本

浏览:181次阅读
没有评论

共计 685 个字符,预计需要花费 2 分钟才能阅读完成。

#!/bin/bash
#chkconfig: 345 85 15
#description: AMH start script.

#/sbin/iptables-restore < /etc/amh-iptables;
function stop()
{
        amh nginx stop;
        amh mysql stop;
        for PID in `ps aux|grep -E 'php-fpm|pure-ftpd|nginx'|grep -v grep|awk '{print $2}'`; do
                kill -QUIT $PID >/dev/null;
        done;
        rm -f /usr/local/php/var/run/pid/*.pid;
        rm -f /usr/local/php/var/run/php-fpm.pid;
        sync;
        {echo 3 > /proc/sys/vm/drop_caches;} 2>/dev/null;
}
function start()
{
        amh mysql start;
        amh php start;
        /usr/local/php/sbin/php-fpm --fpm-config /usr/local/php/etc/php-fpm.conf;
        /usr/local/sbin/redhat.init start 2>/dev/null;
        amh nginx start;
        {echo 0 > /proc/sys/vm/drop_caches;} 2>/dev/null;
}

case "$1" in
        start)
            start
        ;;
        stop)
            stop
        ;;
        restart)
            stop
            sleep 1
            start
        ;;
        *)
            echo "$0 start|stop|restart"
            exit 1
esac
正文完
扫码赞助
post-qrcode
 0
果子
版权声明:本站原创文章,由 果子 于2018-07-13发表,共计685字。
转载说明:除特殊说明外本站文章皆由果较瘦原创发布,转载请注明出处。