aboutsummaryrefslogtreecommitdiff
path: root/www/h2o-devel/files/h2o.in
diff options
context:
space:
mode:
Diffstat (limited to 'www/h2o-devel/files/h2o.in')
-rw-r--r--www/h2o-devel/files/h2o.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/www/h2o-devel/files/h2o.in b/www/h2o-devel/files/h2o.in
index 1e9bc0661287..bf52d7c610f2 100644
--- a/www/h2o-devel/files/h2o.in
+++ b/www/h2o-devel/files/h2o.in
@@ -24,19 +24,23 @@ desc="An HTTP/2 high-performance webserver"
load_rc_config $name
+extra_commands="configtest reload"
+configtest_cmd="h2o_configtest"
+
# defaults
: ${h2o_enable:=NO}
: ${h2o_config:=%%PREFIX%%/etc/${name}/${name}.conf}
: ${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"