From 25d60bda1595b36cc311775340369649c4efb597 Mon Sep 17 00:00:00 2001 From: HITSword Date: Thu, 9 Jan 2020 19:33:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=B8=E8=BD=BD=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E4=B8=8D=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: HITSword --- hyproxy-cli.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hyproxy-cli.php b/hyproxy-cli.php index 5e233bd..a91026b 100644 --- a/hyproxy-cli.php +++ b/hyproxy-cli.php @@ -267,11 +267,19 @@ */ function hyproxy_uninstall() { + //先备份 hyproxy_backup(); + //循环删除所有站点 global $medoo; $table = 'module_hyproxy'; - $medoo->delete($table, null); - hyproxy_make(); + $columns = array('hyproxy_id','server_name','status'); + $where = ''; + $list = $medoo->select($table, $columns, $where); + if (!empty($list)) { + foreach ($list as $row) { + hyproxy_del($row['server_name']); + } + } return "[OK] All proxy del success.\n"; }