From df86c480ba7ccdc0580252ba2ef6559535862ce8 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 10 May 2018 09:53:52 +0000 Subject: [PATCH] Improve and test mtproxyd self-update --- mtproxyd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mtproxyd b/mtproxyd index 2faed25e..f46e1ff4 100755 --- a/mtproxyd +++ b/mtproxyd @@ -17,7 +17,10 @@ if (!file_exists('madeline.php')) { } if (!$debug) { - copy('https://phar.madelineproto.xyz/mtproxyd', $argv[0]); + $mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd'); + if ($mtproxyd) { + file_put_contents($argv[0], $mtproxyd); + } } require_once 'madeline.php';