summaryrefslogtreecommitdiff
path: root/config-service-git.PKGBUILD
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-11-11 00:59:00 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-11-11 00:59:00 -0500
commit3601b6b89aa18c52ff7b486f22faf7621fa636ab (patch)
tree916f3c233b1a40c5f07d69a4a9c17b0286daccb3 /config-service-git.PKGBUILD
parent274200b238895be80bc942afe7d70006c9ab5787 (diff)
refactor
Diffstat (limited to 'config-service-git.PKGBUILD')
-rw-r--r--config-service-git.PKGBUILD21
1 files changed, 11 insertions, 10 deletions
diff --git a/config-service-git.PKGBUILD b/config-service-git.PKGBUILD
index 607c519..689adfa 100644
--- a/config-service-git.PKGBUILD
+++ b/config-service-git.PKGBUILD
@@ -1,10 +1,10 @@
. ${BUILDFILE%/*}/common.sh
-pkgver=20160713.2
-
-depends=(git cgit uwsgi-plugin-cgi config-uwsgi)
+pkgver=20161106.2
package() {
-cd "$pkgdir"
+preamble
+
+depends+=(git)
add-file -m755 etc/ssl/misc/certbot-get.d/10-git <<EOF
#!/bin/bash
@@ -22,17 +22,18 @@ PATH=/srv/git/.local/bin:/bin
0 * * * * chronic bash -c "update-gitmeta 'Update from cron' 2>&1"
EOF
-
# ## transport: git protocol
add-unit etc/systemd/system/sockets.target.wants/git-daemon.socket
# ## transport: HTTPS
+depends+=(cgit uwsgi-plugin-cgi config-mgmt-uwsgi nginx config-mgmt-certbot)
+
# The git web interface is cgit, which is managed by uWSGI speaking
# uwsgi/modifier1=9, which is the variant of the uwsgi protocol for
# CGI requests.
-add-file etc/nginx/sites/server-git.parabola.nu.conf <<EOF
+add-file etc/nginx/sites/server-git_parabola_nu.conf <<EOF
# -*- Mode: nginx; nginx-indent-level: 8; indent-tabs-mode: t -*-
server {
@@ -40,8 +41,8 @@ server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
- error_log /var/log/nginx/nginx.http.git.parabola.nu.error.log error;
- access_log /var/log/nginx/nginx.http.git.parabola.nu.access.log specific;
+ error_log /var/log/nginx/nginx.http.git_parabola_nu.error.log error;
+ access_log /var/log/nginx/nginx.http.git_parabola_nu.access.log specific;
location / {
try_files \$uri @cgit;
@@ -61,7 +62,7 @@ add-file etc/uwsgi/git.ini <<EOF
master = true
processes = 1
-uid = http
+uid = %n
gid = http
plugins = cgi
@@ -71,5 +72,5 @@ EOF
add-unit etc/systemd/system/sockets.target.wants/uwsgi@git.socket
-backup=($(find "$pkgdir" -type f -printf '%P\n'))
+postamble
}