From f3d585671b09e36cf8a4e90b5c63ad18526ee8fc Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 1 Jun 2023 01:23:28 -0400 Subject: fossil http socket listener --- Makefile | 2 +- src/fossil-httpd.socket | 3 +++ src/fossil-httpd@.service | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/fossil-httpd.socket create mode 100644 src/fossil-httpd@.service 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" unit_instance_name != systemd-escape "$$(realpath "$(fossil_database)")" our_name = fossil-sync unit_files_basenames = $(addprefix $(our_name)@.,service path timer) -unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service) +unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service $(addprefix fossil-httpd,.socket @.service)) unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames)) unit_instance = $(our_name)@$(unit_instance_name).service fossil_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 @@ +[Socket] +Accept = yes +ListenStream = 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 @@ +[Unit] +Description = Fossil web server, public-facing +ConditionUser = !root + +[Service] +StandardInput = socket +ExecStart = fossil http --repolist --nossl --host=localhost:8079 --localauth ${HOME}/src/ -- cgit v1.2.3