aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJason McCormick <jason@mfamily.org>2026-10-16 17:04:19 -0400
committerJason McCormick <jason@mfamily.org>2026-10-16 17:04:19 -0400
commit7edb33c87cb1d3ad3421a6fb33247dc871828d7a (patch)
treeb40c4e8eb99248389fe11321b39050a944c1b403 /Makefile
parent98119d8fb55e1633d7bdd79db30fd5caea9ee641 (diff)
first run
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 42cdea6..411a519 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ SHELL := /bin/sh
APP_DIR := /opt/blind-uploader
SYSTEMD_UNIT := /etc/systemd/system/blind-uploader.service
NGINX_CONFIG := /etc/nginx/conf.d/blind-uploader.conf
+TARGETS_FILE := /etc/blind-uploader/allowed-uris
DOMAIN ?= upload.example.com
.PHONY: help check prerequisites install
@@ -26,6 +27,8 @@ install: prerequisites
install -m 0755 server.py $(APP_DIR)/server.py
install -m 0644 README.md $(APP_DIR)/README.md
install -m 0644 static/index.html static/styles.css static/app.js $(APP_DIR)/static/
+ install -d -m 0755 $$(dirname $(TARGETS_FILE))
+ @test -e $(TARGETS_FILE) || install -m 0644 allowed-uris.txt $(TARGETS_FILE)
install -m 0644 deploy/blind-uploader.service $(SYSTEMD_UNIT)
install -d -m 0755 $$(dirname $(NGINX_CONFIG))
sed 's/upload\.example\.com/$(DOMAIN)/g' deploy/nginx-blind-uploader.conf > $(NGINX_CONFIG)