summaryrefslogtreecommitdiff
path: root/config-service-myhostname.PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'config-service-myhostname.PKGBUILD')
-rw-r--r--config-service-myhostname.PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/config-service-myhostname.PKGBUILD b/config-service-myhostname.PKGBUILD
new file mode 100644
index 0000000..c13560b
--- /dev/null
+++ b/config-service-myhostname.PKGBUILD
@@ -0,0 +1,41 @@
+. ${BUILDFILE%/*}/common.sh
+pkgver=20161106.2
+
+package() {
+preamble
+
+add-file etc/nginx/sites/server-myhostname.conf <<EOF
+# -*- Mode: nginx; nginx-indent-level: 8; indent-tabs-mode: t -*-
+
+server {
+ server_name \$hostname;
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+
+ error_log /var/log/nginx/nginx.http.myhostname.error.log error;
+ access_log /var/log/nginx/nginx.http.myhostname.access.log specific;
+
+ location = / {
+ uwsgi_pass unix:/run/uwsgi/myhostname.sock;
+ uwsgi_modifier1 9; # Standard CGI request
+ include uwsgi_params;
+ }
+}
+EOF
+
+add-file etc/uwsgi/myhostname.ini <<EOF
+[uwsgi]
+master = true
+processes = 1
+
+uid = nobody
+gid = http
+
+plugins = cgi
+cgi = /srv/http/myhostname/sysinfo
+EOF
+
+add-unit etc/systemd/system/sockets.target.wants/uwsgi@myhostname.socket
+
+postamble
+}