From 4640ea1a9249c08b749f174cb19f6dc61a505a00 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 11 Apr 2020 16:38:57 +0200 Subject: Debian 10 package --- Makefile | 6 ++++-- README.txt | 14 ++++++++++++++ debian/webserver.service | 4 +++- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 README.txt diff --git a/Makefile b/Makefile index d167ab4..1bce5e4 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ SRC=$(PROGSRC) webserver.cpp all: $(PROJECTNAME) test-$(PROJECTNAME) for i in $(PLUGINS) ; do make -C plugins/$$i ; done ./test-$(PROJECTNAME) - ./webserver -c webserver.conf + #./webserver -c webserver.conf # testsuite ---------------------------------------------- test-$(PROJECTNAME): $(TESTSRC:.cpp=.o) @@ -108,6 +108,8 @@ install: cp webserver $(DESTDIR)/usr/bin mkdir -p $(DESTDIR)/usr/lib/webserver/plugins + cp plugins/static-files/static-files.so $(DESTDIR)/usr/lib/webserver/plugins + mkdir -p $(DESTDIR)/usr/local/lib/webserver/plugins mkdir -p $(DESTDIR)/etc @@ -122,7 +124,7 @@ deb-src: dpkg-source -b . $(DISTROS): deb-src - sudo pbuilder build --basetgz /var/cache/pbuilder/$@.tgz --buildresult result/$@ ../webserver_$(VERSION).dsc ; \ + sudo pbuilder build --basetgz /var/cache/pbuilder/$@.tgz --buildresult result/$@ ../webserver_$(VERSION).dsc debs: $(DISTROS) diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..37b57c5 --- /dev/null +++ b/README.txt @@ -0,0 +1,14 @@ +Edit /etc/webserver.conf + +Enable in Debian: + +systemctl enable webserver.service + +Start: + +systemctl start webserver + +Status: + +systemctl status webserver +or /var/log/syslog diff --git a/debian/webserver.service b/debian/webserver.service index fc30893..511bd6d 100644 --- a/debian/webserver.service +++ b/debian/webserver.service @@ -5,7 +5,9 @@ After=network.target [Service] Type=simple # Restart=always -ExecStart=/usr/bin/webserver 127.0.0.1 80 /tmp 10 +ExecStart=/usr/bin/webserver -c /etc/webserver.conf + +# webserver will lower privileges to www-data:www-data #User=www-data #Group=www-data -- cgit v1.2.3