1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
freebsd-ports/japanese/p5-2chproxy/files/twochproxy.in
Hiroki Sato 0c58bf30ac - Add japanese/p5-2chproxy, an HTTP proxy converting contents of 2ch.net
into the old .dat format.
- Update japanese/navi2ch to use japanese/p5-2chproxy as an HTTP server
  by default.
2016-11-16 00:43:30 +00:00

33 lines
423 B
Bash

#!/bin/sh
#
# PROVIDE: twochproxy
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# $FreeBSD$
. /etc/rc.subr
name=twochproxy
rcvar=${name}_enable
command=%%PREFIX%%/sbin/2chproxy.pl
start_cmd=${name}_start
stop_cmd=${name}_stop
load_rc_config $name
pidfile=/var/run/2chproxy.pid
: ${twochproxy_enable:=NO}
twochproxy_start()
{
$command --daemon
}
twochproxy_stop()
{
$command --kill && rm -f $pidfile
}
run_rc_command "$1"