summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorLizzy Hunt <elizabeth.hunt@simponic.xyz>2024-03-10 01:41:11 -0700
committerLizzy Hunt <elizabeth.hunt@simponic.xyz>2024-03-10 01:41:11 -0700
commitb74bd67a4a25076812e86e7989a63b9540e68b25 (patch)
tree39824a177b8e3b4d25123392427442f6a3d4add1 /html
parent11155128178ff3d8ea803a70dd7749e594b247a9 (diff)
downloadtilde.club-b74bd67a4a25076812e86e7989a63b9540e68b25.tar.gz
tilde.club-b74bd67a4a25076812e86e7989a63b9540e68b25.zip
attempt systemd deployment
Diffstat (limited to 'html')
-rwxr-xr-xhtml/fruitvote/start.sh7
-rw-r--r--html/public/fruitvote/GoPage.php13
2 files changed, 2 insertions, 18 deletions
diff --git a/html/fruitvote/start.sh b/html/fruitvote/start.sh
deleted file mode 100755
index dd3036b..0000000
--- a/html/fruitvote/start.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-nice -n 19 /home/simponic/fruitvote/fruitvote \
- --users simponic,nginx \
- --socket-path /home/simponic/fruitvote/http.sock \
- &
-# --database /home/simponic/fruitvote/db.sqlite \
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;