summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpigfoot <pigfoot@gmail.com>2015-03-02 14:57:57 +0800
committerpigfoot <pigfoot@gmail.com>2015-03-02 14:57:57 +0800
commit007267cd4dc93d243398e9a86dd1d038097dd598 (patch)
tree8e44ca5d9b07bf1beff33460856de68dae7703d4 /www-servers/h2o/files
parentRefine bittorrent-sync #6 (diff)
downloadpigfoot-007267cd4dc93d243398e9a86dd1d038097dd598.tar.gz
pigfoot-007267cd4dc93d243398e9a86dd1d038097dd598.tar.bz2
pigfoot-007267cd4dc93d243398e9a86dd1d038097dd598.zip
Add h2o (git and v1.0.1)
Diffstat (limited to 'www-servers/h2o/files')
-rw-r--r--www-servers/h2o/files/conf/h2o.conf19
-rw-r--r--www-servers/h2o/files/initd/h2o.initd36
2 files changed, 55 insertions, 0 deletions
diff --git a/www-servers/h2o/files/conf/h2o.conf b/www-servers/h2o/files/conf/h2o.conf
new file mode 100644
index 0000000..e0a1370
--- /dev/null
+++ b/www-servers/h2o/files/conf/h2o.conf
@@ -0,0 +1,19 @@
+user: h2o
+
+listen:
+ host: localhost
+ port: 80
+
+#listen:
+# host: localhost
+# port: 443
+# ssl:
+# certificate-file: /etc/h2o/server.crt
+# key-file: /etc/h2o/server.key
+
+hosts:
+ localhost:
+ access-log: /var/log/h2o/localhost-access.log
+ paths:
+ /:
+ file.dir: /var/www/localhost/htdocs
diff --git a/www-servers/h2o/files/initd/h2o.initd b/www-servers/h2o/files/initd/h2o.initd
new file mode 100644
index 0000000..fe63af5
--- /dev/null
+++ b/www-servers/h2o/files/initd/h2o.initd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+CONF_FILE=${CONF_FILE:-/etc/${SVCNAME}/${SVCNAME}.conf}
+RUN_DIR=${RUN_DIR:-/run/${SVCNAME}}
+
+command="/usr/bin/h2o"
+command_args="-c ${CONF_FILE}"
+pidfile=${RUN_DIR}/${SVCNAME}.pid
+command_background="true"
+_USER="h2o"
+_GROUP="h2o"
+start_stop_daemon_args="--user root --group ${_GROUP}"
+
+depend() {
+ need net
+ after sshd
+}
+
+_checkconfig() {
+ checkpath -d -m 0750 -o "${_USER}":"${_GROUP}" "${RUN_DIR}"
+
+ if [ ! -f "${CONF_FILE}" ] ; then
+ ewarn "${CONF_FILE} does not exist."
+ return 1
+ fi
+
+ ${command} ${command_args} -t >/dev/null
+}
+
+start_pre() {
+ _checkconfig || return 1
+}