<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[CentOS ProFtpd启动脚本]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[服务器类]]></category>
<pubDate>Wed, 15 Feb 2017 07:53:25 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	<textarea name="code" class="c" rows="15" cols="100">#!/bin/bash
#
# chkconfig: 2345 85 15
# description: ProFTPd is an FTP server
# processname: proftpd

# Author:&nbsp;&nbsp; jingyihome
# E-mail:&nbsp;&nbsp; webmaster@zhanghaijun.com
# Website:&nbsp;&nbsp;https://www.zhanghaijun.com

# ProFTPd Settings
PROFTPD=&quot;/usr/local/ftp/proftpd/sbin/proftpd&quot;
PROCONF=&quot;/usr/local/ftp/proftpd/etc/proftpd.conf&quot;
PROPID=&quot;/usr/local/ftp/proftpd/var/proftpd.pid&quot;
RETVAL=0
prog=&quot;ProFTPd&quot;

start() &#123;
&nbsp;&nbsp;&nbsp;&nbsp;echo -n $&quot;Starting $prog... &quot;
&nbsp;&nbsp;&nbsp;&nbsp;$PROFTPD -c $PROCONF
&nbsp;&nbsp;&nbsp;&nbsp;if [ &quot;$?&quot; = 0 ] ; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; done&quot;
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; failed&quot;
&nbsp;&nbsp;&nbsp;&nbsp;fi
&#125;

stop() &#123;
&nbsp;&nbsp;&nbsp;&nbsp;echo -n $&quot;Stopping $prog...&nbsp;&nbsp;&quot;
&nbsp;&nbsp;&nbsp;&nbsp;if [ ! -e $PROPID ]; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -n $&quot;$prog is not running.&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 1
&nbsp;&nbsp;&nbsp;&nbsp;fi
&nbsp;&nbsp;&nbsp;&nbsp;kill `cat $PROPID`
&nbsp;&nbsp;&nbsp;&nbsp;if [ &quot;$?&quot; = 0 ] ; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; done&quot;
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; failed&quot;
&nbsp;&nbsp;&nbsp;&nbsp;fi
&#125;

restart()&#123;
&nbsp;&nbsp;&nbsp;&nbsp;echo $&quot;Restarting $prog...&quot;
&nbsp;&nbsp;&nbsp;&nbsp;$0 stop
&nbsp;&nbsp;&nbsp;&nbsp;sleep 2
&nbsp;&nbsp;&nbsp;&nbsp;$0 start
&#125;

status()&#123;
&nbsp;&nbsp;&nbsp;&nbsp;if [ -e $PROPID ]; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $&quot;$prog is running.&quot;
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $&quot;$prog is not running.&quot;
&nbsp;&nbsp;&nbsp;&nbsp;fi
&#125;

case &quot;$1&quot; in
&nbsp;&nbsp;&nbsp;&nbsp;start)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;&nbsp;&nbsp;stop)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stop
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;&nbsp;&nbsp;restart)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;restart
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;&nbsp;&nbsp;status)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;*)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $&quot;Usage: $0 &#123;start&#124;stop&#124;restart&#124;status&#125;&quot;
esac
</textarea><br/>Tags - <a href="http://www.zhanghaijun.com/tags/centos/" rel="tag">centos</a> , <a href="http://www.zhanghaijun.com/tags/proftpd/" rel="tag">proftpd</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] CentOS ProFtpd启动脚本]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>