pull/109/head
Mr Chen 6 years ago
parent 072bc19d01
commit 29d3c11a8e
  1. 14
      plugins/pureftp/index.py
  2. 2
      plugins/pureftp/info.json
  3. 2
      plugins/pureftp/init.d/pure-config.pl
  4. 2
      plugins/pureftp/init.d/pure-ftpd.tpl

@ -90,6 +90,14 @@ def initDreplace():
public.writeFile(file_bin, content) public.writeFile(file_bin, content)
public.execShell('chmod +x ' + file_bin) public.execShell('chmod +x ' + file_bin)
pureTplConfig = getPluginDir() + "/init.d/pure-config.pl"
pureSbinConfig = getServerDir() + "/sbin/pure-config.pl"
content = public.readFile(pureTplConfig)
content = contentReplace(content)
public.writeFile(pureSbinConfig, content)
public.execShell('chmod +x ' + pureSbinConfig)
# # config replace # # config replace
# conf_content = public.readFile(getConf()) # conf_content = public.readFile(getConf())
# conf_content = conf_content.replace('{$SERVER_PATH}', service_path) # conf_content = conf_content.replace('{$SERVER_PATH}', service_path)
@ -103,7 +111,7 @@ def start():
data = public.execShell(file + ' start') data = public.execShell(file + ' start')
if data[1] == '': if data[1] == '':
return 'ok' return 'ok'
return 'fail' return data[1]
def stop(): def stop():
@ -111,7 +119,7 @@ def stop():
data = public.execShell(file + ' stop') data = public.execShell(file + ' stop')
if data[1] == '': if data[1] == '':
return 'ok' return 'ok'
return 'fail' return data[1]
def restart(): def restart():
@ -127,7 +135,7 @@ def reload():
data = public.execShell(file + ' reload') data = public.execShell(file + ' reload')
if data[1] == '': if data[1] == '':
return 'ok' return 'ok'
return 'fail' return data[1]
def initdStatus(): def initdStatus():

@ -1,5 +1,5 @@
{ {
"title":"pureftp", "title":"PureFtpd",
"tip":"soft", "tip":"soft",
"name":"pureftp", "name":"pureftp",
"ps":"PureFTPd是一款专注于程序健壮和软件安全的免费FTP服务器软件", "ps":"PureFTPd是一款专注于程序健壮和软件安全的免费FTP服务器软件",

@ -9,7 +9,7 @@ my ($conffile, @flg) = @ARGV;
my $PUREFTPD; my $PUREFTPD;
-x && ($PUREFTPD=$_, last) for qw( -x && ($PUREFTPD=$_, last) for qw(
${exec_prefix}/sbin/pure-ftpd {$SERVER_PATH}/pureftp/sbin/pure-ftpd
/www/server/pure-ftpd/sbin/pure-ftpd /www/server/pure-ftpd/sbin/pure-ftpd
/www/server/pureftpd/sbin/pure-ftpd /www/server/pureftpd/sbin/pure-ftpd
/www/server/sbin/pure-ftpd /www/server/sbin/pure-ftpd

@ -15,7 +15,7 @@
### END INIT INFO ### END INIT INFO
# Pure-FTPd Settings # Pure-FTPd Settings
PURE_PERL="{$SERVER_PATH}/pureftp/sbin/pure-ftpd" PURE_PERL="{$SERVER_PATH}/pureftp/sbin/pure-config.pl"
PURE_CONF="{$SERVER_PATH}/pureftp/etc/pure-ftpd.conf" PURE_CONF="{$SERVER_PATH}/pureftp/etc/pure-ftpd.conf"
PURE_PID="/var/run/pure-ftpd.pid" PURE_PID="/var/run/pure-ftpd.pid"
RETVAL=0 RETVAL=0

Loading…
Cancel
Save