fixup! fix warp update
This commit is contained in:
+5
-7
@@ -4693,8 +4693,10 @@ DNS-over-HTTPS with IP:
|
|||||||
public function offWarp()
|
public function offWarp()
|
||||||
{
|
{
|
||||||
$p = $this->getPacConf();
|
$p = $this->getPacConf();
|
||||||
$flag = $this->selfupdate ? empty($p['warpoff']) : !empty($p['warpoff']);
|
if (!empty($this->selfupdate) && !empty($p['warpoff'])) {
|
||||||
if ($flag) {
|
$this->ssh('warp-cli --accept-tos registration delete 2>&1', 'wp');
|
||||||
|
$this->ssh('pkill warp-svc', 'wp');
|
||||||
|
} elseif (!empty($p['warpoff'])) {
|
||||||
$this->ssh('warp-svc > /dev/null 2>&1 &', 'wp');
|
$this->ssh('warp-svc > /dev/null 2>&1 &', 'wp');
|
||||||
sleep(3);
|
sleep(3);
|
||||||
if (empty($this->ssh('[ -f "/var/lib/cloudflare-warp/conf.json" ] && echo 1', 'wp'))) {
|
if (empty($this->ssh('[ -f "/var/lib/cloudflare-warp/conf.json" ] && echo 1', 'wp'))) {
|
||||||
@@ -4707,11 +4709,7 @@ DNS-over-HTTPS with IP:
|
|||||||
$this->send($this->input['chat'], 'Connect: ' . $this->ssh('warp-cli --accept-tos connect 2>&1', 'wp'));
|
$this->send($this->input['chat'], 'Connect: ' . $this->ssh('warp-cli --accept-tos connect 2>&1', 'wp'));
|
||||||
unset($p['warpoff']);
|
unset($p['warpoff']);
|
||||||
} else {
|
} else {
|
||||||
if (!empty($this->selfupdate)) {
|
$this->send($this->input['chat'], 'Registration delete: ' . $this->ssh('warp-cli --accept-tos registration delete 2>&1', 'wp'));
|
||||||
$this->ssh('warp-cli --accept-tos registration delete 2>&1', 'wp');
|
|
||||||
} else {
|
|
||||||
$this->send($this->input['chat'], 'Registration delete: ' . $this->ssh('warp-cli --accept-tos registration delete 2>&1', 'wp'));
|
|
||||||
}
|
|
||||||
$this->ssh('pkill warp-svc', 'wp');
|
$this->ssh('pkill warp-svc', 'wp');
|
||||||
$p['warpoff'] = 1;
|
$p['warpoff'] = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user