Add PHP_EOLs to parsed client.conf

This commit is contained in:
billz 2021-03-07 10:39:33 +00:00
parent 3ac70a3a3c
commit 55e94adb2b

View file

@ -11,7 +11,8 @@ if (!isset($_SERVER['HTTP_REFERER'])) {
}
exec("sudo cat " .RASPI_WIREGUARD_PATH.'client.conf', $return);
$peer_conf = qr_encode(implode($return));
$peer_conf = implode(PHP_EOL,$return);
$peer_conf.= PHP_EOL;
$command = "qrencode -t svg -m 0 -o - " . mb_escapeshellarg($peer_conf);
$svg = shell_exec($command);
$etag = hash('sha256', $peer_conf);