diff options
Diffstat (limited to 'config-service-myhostname.PKGBUILD')
-rw-r--r-- | config-service-myhostname.PKGBUILD | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/config-service-myhostname.PKGBUILD b/config-service-myhostname.PKGBUILD index 5285c8b..ff32aaa 100644 --- a/config-service-myhostname.PKGBUILD +++ b/config-service-myhostname.PKGBUILD @@ -1,15 +1,11 @@ . ${BUILDFILE%/*}/common.sh -pkgver=20161112 +pkgver=20170201.1 package() { preamble # #### Host information -depends+=( - config-mgmt-nginx - config-mgmt-uwsgi - uwsgi-plugin-cgi -) +depends+=(config-mgmt-nginx) add-file etc/nginx/sites/server-myhostname.conf <<EOF # -*- Mode: nginx; nginx-indent-level: 8; indent-tabs-mode: t -*- @@ -33,6 +29,13 @@ server { } EOF +# Let's have a simple CGI script show server info + +depends+=( + config-mgmt-uwsgi + uwsgi-plugin-cgi +) + add-file -m755 srv/http/myhostname/sysinfo <<EOF #!/bin/bash # Copyright 2016 Luke Shumaker @@ -56,8 +59,6 @@ for cmd in "\${cmds[@]}"; do done EOF -ln -s /var/cache/pacman/pkg srv/http/myhostname/pkg - add-file etc/uwsgi/myhostname.ini <<EOF [uwsgi] master = true @@ -72,5 +73,27 @@ EOF add-unit etc/systemd/system/sockets.target.wants/uwsgi@myhostname.socket +# Expose the pacman cache so pinned packages can be duplicated +ln -s /var/cache/pacman/pkg srv/http/myhostname/pkg + +# Expose collectd via RRD files +ln -s /var/lib/collectd srv/http/myhostname/collectd + +depends+=( + config-base-collectd + rrdtool + config-mgmt-pacman-repo-lukeshu # for systemd-timesyncd-wait-git + systemd-timesyncd-wait-git +) + +add-unit etc/systemd/system/multi-user.target.wants/collectd.service + +add-file -m644 etc/systemd/system/collectd.service.d/time-sync.conf <<EOF +[Unit] +# Because we write RRD files with timestamps in them, we need to have +# a functional clock. Otherwise the RRD files will get garbled. +After=time-sync.target +EOF + postamble } |