From b74bd67a4a25076812e86e7989a63b9540e68b25 Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Sun, 10 Mar 2024 01:41:11 -0700 Subject: attempt systemd deployment --- html/public/fruitvote/GoPage.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'html/public/fruitvote/GoPage.php') diff --git a/html/public/fruitvote/GoPage.php b/html/public/fruitvote/GoPage.php index 27fc361..864c1f7 100644 --- a/html/public/fruitvote/GoPage.php +++ b/html/public/fruitvote/GoPage.php @@ -4,28 +4,19 @@ class GoPage { private $socket; private $template; - public function __construct($page, $socket = "/home/simponic/fruitvote/http.sock", $start_cmd="/home/simponic/fruitvote/start.sh", $template = "../template.html") { + public function __construct($page, $socket = "/home/simponic/fruitvote/http.sock", $template = "../template.html") { $this->page = $page; $this->socket = $socket; $this->template = $template; - // test if socket exists - if (!file_exists($socket)) { - // start the server - exec($start_cmd); - } - for ($i = 0; $i < 10; $i++) { if (file_exists($socket)) { break; } usleep(100_000); // wait 100ms } - - if (!file_exists($socket)) { - throw new Exception("Could not start server"); - } } + public function go() { $ch = curl_init(); $url = "http://localhost".$this->page; -- cgit v1.2.3-70-g09d2