Index: Makefile =================================================================== --- Makefile (revision 505393) +++ Makefile (working copy) @@ -4,7 +4,7 @@ PORTNAME= h2o DISTVERSIONPREFIX= v DISTVERSION= 2.3.0-beta1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www PKGNAMESUFFIX= -devel Index: files/h2o.conf.sample.in =================================================================== --- files/h2o.conf.sample.in (revision 505393) +++ files/h2o.conf.sample.in (working copy) @@ -39,20 +39,13 @@ # 6 months HSTS pinning header.add: "Strict-Transport-Security: max-age=16000000" -# no patience for slow users -http1-request-timeout: 10 -http2-idle-timeout: 10 # limit POST bodies limit-request-body: 10485760 # 10MiB -max-connections: 1024 file.mime.addtypes: - image/svg+xml: .svg text/plain: .log text/css: .css application/atom+xml: .xml - application/zip: .zip - application/json: .json "text/html; charset=utf-8": .html # per-host configurations Index: files/h2o.in =================================================================== --- files/h2o.in (revision 505393) +++ files/h2o.in (working copy) @@ -24,6 +24,9 @@ load_rc_config $name +extra_commands="configtest reload" +configtest_cmd="h2o_configtest" + # defaults : ${h2o_enable:=NO} : ${h2o_config:=%%PREFIX%%/etc/${name}/${name}.conf} @@ -30,13 +33,14 @@ : ${h2o_perl:=%%LOCALBASE%%/bin/perl} # daemon -pidfile=`grep pid-file ${h2o_config} | cut -d' ' -f2` +pidfile=`grep pid-file ${h2o_config} | awk '{print $2}'` h2o_env="H2O_PERL=${h2o_perl}" command="%%PREFIX%%/bin/${name}" command_args="-m daemon -c ${h2o_config}" procname="%%LOCALBASE%%/bin/perl" -# support SIGHUP to reload configuration file -extra_commands=reload +h2o_configtest() { + "${command}" -c "${h2o_config}" -t +} run_rc_command "$1"