diff options
author | Andrew Cady <d@jerkface.net> | 2023-06-01 01:23:28 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2023-06-01 01:23:28 -0400 |
commit | f3d585671b09e36cf8a4e90b5c63ad18526ee8fc (patch) | |
tree | 9d56a4af183e983064a33a2b2fe34b18b56b3063 | |
parent | fb30ff32e41d5a005d5641f1773783d31f08b5e6 (diff) |
fossil http socket listener
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/fossil-httpd.socket | 3 | ||||
-rw-r--r-- | src/fossil-httpd@.service | 7 |
3 files changed, 11 insertions, 1 deletions
@@ -4,7 +4,7 @@ unitdir = "$${XDG_CONFIG_HOME:-$$HOME/.config}/systemd/user" | |||
4 | unit_instance_name != systemd-escape "$$(realpath "$(fossil_database)")" | 4 | unit_instance_name != systemd-escape "$$(realpath "$(fossil_database)")" |
5 | our_name = fossil-sync | 5 | our_name = fossil-sync |
6 | unit_files_basenames = $(addprefix $(our_name)@.,service path timer) | 6 | unit_files_basenames = $(addprefix $(our_name)@.,service path timer) |
7 | unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service) | 7 | unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service $(addprefix fossil-httpd,.socket @.service)) |
8 | unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames)) | 8 | unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames)) |
9 | unit_instance = $(our_name)@$(unit_instance_name).service | 9 | unit_instance = $(our_name)@$(unit_instance_name).service |
10 | fossil_test_instances = '$(shell systemd-escape fossil-test-instance-1)' '$(shell systemd-escape a/b/c/fossil-test-instance-2)' | 10 | 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 @@ | |||
1 | [Socket] | ||
2 | Accept = yes | ||
3 | 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 @@ | |||
1 | [Unit] | ||
2 | Description = Fossil web server, public-facing | ||
3 | ConditionUser = !root | ||
4 | |||
5 | [Service] | ||
6 | StandardInput = socket | ||
7 | ExecStart = fossil http --repolist --nossl --host=localhost:8079 --localauth ${HOME}/src/ | ||