summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-06-01 01:23:28 -0400
committerAndrew Cady <d@jerkface.net>2023-06-01 01:23:28 -0400
commitf3d585671b09e36cf8a4e90b5c63ad18526ee8fc (patch)
tree9d56a4af183e983064a33a2b2fe34b18b56b3063
parentfb30ff32e41d5a005d5641f1773783d31f08b5e6 (diff)
fossil http socket listener
-rw-r--r--Makefile2
-rw-r--r--src/fossil-httpd.socket3
-rw-r--r--src/fossil-httpd@.service7
3 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9b3737e..fd6f7c6 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ unitdir = "$${XDG_CONFIG_HOME:-$$HOME/.config}/systemd/user"
4unit_instance_name != systemd-escape "$$(realpath "$(fossil_database)")" 4unit_instance_name != systemd-escape "$$(realpath "$(fossil_database)")"
5our_name = fossil-sync 5our_name = fossil-sync
6unit_files_basenames = $(addprefix $(our_name)@.,service path timer) 6unit_files_basenames = $(addprefix $(our_name)@.,service path timer)
7unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service) 7unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service $(addprefix fossil-httpd,.socket @.service))
8unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames)) 8unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames))
9unit_instance = $(our_name)@$(unit_instance_name).service 9unit_instance = $(our_name)@$(unit_instance_name).service
10fossil_test_instances = '$(shell systemd-escape fossil-test-instance-1)' '$(shell systemd-escape a/b/c/fossil-test-instance-2)' 10fossil_test_instances = '$(shell systemd-escape fossil-test-instance-1)' '$(shell systemd-escape a/b/c/fossil-test-instance-2)'
diff --git a/src/fossil-httpd.socket b/src/fossil-httpd.socket
new file mode 100644
index 0000000..3575752
--- /dev/null
+++ b/src/fossil-httpd.socket
@@ -0,0 +1,3 @@
1[Socket]
2Accept = yes
3ListenStream = 8079
diff --git a/src/fossil-httpd@.service b/src/fossil-httpd@.service
new file mode 100644
index 0000000..eccc17c
--- /dev/null
+++ b/src/fossil-httpd@.service
@@ -0,0 +1,7 @@
1[Unit]
2Description = Fossil web server, public-facing
3ConditionUser = !root
4
5[Service]
6StandardInput = socket
7ExecStart = fossil http --repolist --nossl --host=localhost:8079 --localauth ${HOME}/src/