diff --git a/plugins/pureftp/ico.png b/plugins/pureftp/ico.png new file mode 100644 index 000000000..ac1207e74 Binary files /dev/null and b/plugins/pureftp/ico.png differ diff --git a/plugins/pureftp/info.json b/plugins/pureftp/info.json new file mode 100755 index 000000000..d259182a2 --- /dev/null +++ b/plugins/pureftp/info.json @@ -0,0 +1,14 @@ +{ + "title":"pureftp", + "tip":"soft", + "name":"pureftp", + "ps":"PureFTPd是一款专注于程序健壮和软件安全的免费FTP服务器软件", + "versions": "1.0.47", + "shell":"install.sh", + "checks":"server/pureftp", + "path":"server/pureftp", + "author":"mdserver-web", + "home":"https://github.com/midoks/mdserver-web", + "date":"2018-11-30", + "pid":"3" +} \ No newline at end of file diff --git a/plugins/pureftp/install.sh b/plugins/pureftp/install.sh new file mode 100755 index 000000000..5c8c8f0cb --- /dev/null +++ b/plugins/pureftp/install.sh @@ -0,0 +1,55 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + +install_tmp=${rootPath}/tmp/bt_install.pl + +Install_pureftp() +{ + mkdir -p ${serverPath}/pureftp + mkdir -p ${serverPath}/source/pureftp + + VER=$1 + FILE=pure-ftpd-${VER}.tar.gz + DOWNLOAD=https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${VER}.tar.gz + + + if [ ! -f $serverPath/source/pureftp/$FILE ];then + wget -O $serverPath/source/pureftp/$FILE $DOWNLOAD + fi + + if [ ! -d $serverPath/source/pureftp/$FILE ];then + cd $serverPath/source/pureftp && tar zxvf $FILE + fi + + cd pure-ftpd-${1} && ./configure --prefix=${serverPath}/pureftp \ +  --without-inetd \ +  --with-altlog \ +  --with-puredb \ +  --with-throttling \ +  --with-peruserlimits \ +  --with-tls && make && make install + + + + echo "${1}" > ${serverPath}/pureftp/version.pl + echo '安装完成' > $install_tmp +} + +Uninstall_pureftp() +{ + rm -rf ${serverPath}/pureftp + echo '卸载完成' > $install_tmp +} + +action=$1 +if [ "${1}" == 'install' ];then + Install_pureftp $2 +else + Uninstall_pureftp $2 +fi