summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSergey Lukin <sergej.lukin@gmail.com>2015-12-04 09:30:06 +0200
committerSergey Lukin <sergej.lukin@gmail.com>2015-12-04 09:30:06 +0200
commit6d3d30af5f6cdb789de02909fc0d5800151d8fa1 (patch)
tree8076d34295a8eb359ec5890e6e7c9fc2fcb07376 /etc
parent7b24b7b03b6e69f6339282fad25c24fcc4e103ad (diff)
downloadbuild-errors-6d3d30af5f6cdb789de02909fc0d5800151d8fa1.tar.bz2
build-errors-6d3d30af5f6cdb789de02909fc0d5800151d8fa1.tar.xz
php replaced with haserl (no need to run php for several lines of code)
Diffstat (limited to 'etc')
-rw-r--r--etc/conf.d/mqtt-exec.build-errors8
-rw-r--r--etc/lighttpd/lighttpd.conf32
-rw-r--r--etc/lighttpd/mod_cgi.conf35
-rw-r--r--etc/mini_httpd/mini_httpd.conf4
-rw-r--r--etc/periodic/weekly/clear-old-build-errors.sh2
5 files changed, 74 insertions, 7 deletions
diff --git a/etc/conf.d/mqtt-exec.build-errors b/etc/conf.d/mqtt-exec.build-errors
index e573eb7..46e297c 100644
--- a/etc/conf.d/mqtt-exec.build-errors
+++ b/etc/conf.d/mqtt-exec.build-errors
@@ -1,9 +1,5 @@
-exec_command="/bin/sh /usr/share/build-errors/save-build-error.sh"
+exec_command="/bin/sh /var/lib/build-errors/scripts/save-build-error.sh"
# it did not work without '/bin/sh '
-exec_user="www"
+exec_user="lighttpd"
mqtt_broker="msg.alpinelinux.org"
- # for testing
- # mqtt_broker="broker.hivemq.com"
- # then run:
- # mosquitto_pub -h broker.hivemq.com -t 'build/build-edge-armhf/errors' -m '{"hostname":"build-edge-armhf","pkgname":"package1","reponame":"repo1","logurl":"http:\/\/build.alpinelinux.org\/buildlogs\/build-edge-armhf\/main\/package1\/package1-5.5.1-r0.log"}'
mqtt_topics="build/+/errors"
diff --git a/etc/lighttpd/lighttpd.conf b/etc/lighttpd/lighttpd.conf
new file mode 100644
index 0000000..a6805cc
--- /dev/null
+++ b/etc/lighttpd/lighttpd.conf
@@ -0,0 +1,32 @@
+var.basedir = "/var/www/localhost"
+var.logdir = "/var/log/lighttpd"
+var.statedir = "/var/lib/lighttpd"
+server.modules = (
+ "mod_access",
+ "mod_setenv",
+ "mod_simple_vhost",
+ "mod_accesslog"
+)
+include "mime-types.conf"
+include "mod_cgi.conf"
+server.username = "lighttpd"
+server.groupname = "lighttpd"
+server.document-root = var.basedir + "/htdocs"
+server.pid-file = "/var/run/lighttpd.pid"
+server.errorlog = var.logdir + "/error.log"
+server.indexfiles = ("index.php", "index.lua", "index.html"
+ "index.htm", "default.htm")
+server.follow-symlink = "enable"
+static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi", ".lua")
+accesslog.filename = var.logdir + "/access.log"
+dir-listing.activate = "enable"
+dir-listing.hide-dotfiles = "enable"
+url.access-deny = ("~", ".inc")
+simple-vhost.server-root = "/var/www"
+simple-vhost.default-host = "localhost"
+simple-vhost.document-root = "/htdocs/"
+setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
+$HTTP["url"] =~ "\.log\.gz$" {
+ setenv.add-response-header = ("Content-Encoding" => "x-gzip")
+ mimetype.assign = (".log.gz" => "text/plain")
+}
diff --git a/etc/lighttpd/mod_cgi.conf b/etc/lighttpd/mod_cgi.conf
new file mode 100644
index 0000000..053f080
--- /dev/null
+++ b/etc/lighttpd/mod_cgi.conf
@@ -0,0 +1,35 @@
+###############################################################################
+# mod_cgi.conf
+# include'd by lighttpd.conf.
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_cgi.conf,v 1.1 2005/08/27 12:36:13 ka0ttic Exp $
+###############################################################################
+
+#
+# see cgi.txt for more information on using mod_cgi
+#
+
+server.modules += ("mod_cgi")
+
+# NOTE: this requires mod_alias
+#alias.url = (
+# "/cgi-bin/" => var.basedir + "/cgi-bin/"
+#)
+
+#
+# Note that you'll also want to enable the
+# cgi-bin alias via mod_alias (above).
+#
+
+$HTTP["url"] =~ "^/cgi-bin/" {
+ # disable directory listings
+ dir-listing.activate = "disable"
+ # only allow cgi's in this directory
+ cgi.assign = (
+ ".pl" => "/usr/bin/perl",
+ ".cgi" => "/usr/bin/perl"
+ )
+}
+
+cgi.assign = (
+ ".lua" => ""
+)
diff --git a/etc/mini_httpd/mini_httpd.conf b/etc/mini_httpd/mini_httpd.conf
new file mode 100644
index 0000000..ddb5bd8
--- /dev/null
+++ b/etc/mini_httpd/mini_httpd.conf
@@ -0,0 +1,4 @@
+port=80
+user=nobody
+dir=/var/lib/build-errors/htdocs
+cgipat=**.sh|**.cgi|**.lua
diff --git a/etc/periodic/weekly/clear-old-build-errors.sh b/etc/periodic/weekly/clear-old-build-errors.sh
index 7118f7d..3f713b2 100644
--- a/etc/periodic/weekly/clear-old-build-errors.sh
+++ b/etc/periodic/weekly/clear-old-build-errors.sh
@@ -1 +1 @@
-sqlite3 /srv/sqlite/build-errors.db "delete from build_errors where datetime < datetime('now', '-7 day')"
+sqlite3 /var/lib/build-errors/sqlite/build-errors.db "delete from build_errors where datetime < datetime('now', '-7 day')"