View | Details | Raw Unified | Return to bug 257074 | Differences between
and this patch

Collapse All | Expand All

(-)b/databases/go-pgweb/Makefile (+10 lines)
Lines 15-18 GH_ACCOUNT= sosedoff Link Here
15
GO_PKGNAME=	github.com/sosedoff/pgweb
15
GO_PKGNAME=	github.com/sosedoff/pgweb
16
PLIST_FILES=	bin/pgweb
16
PLIST_FILES=	bin/pgweb
17
17
18
USE_RC_SUBR=	${PORTNAME}
19
20
SUB_FILES+=	pkg-message
21
SUB_LIST+=	PORTNAME=${PORTNAME} \
22
			PGWEBUSER=${USERS} \
23
			PGWEBGROUP=${GROUPS}
24
25
USERS=		www
26
GROUPS=		www
27
18
.include <bsd.port.mk>
28
.include <bsd.port.mk>
(-)b/databases/go-pgweb/files/pgweb.in (+50 lines)
Added Link Here
1
#!/bin/sh
2
#
3
#
4
# PROVIDE: %%PORTNAME%%
5
# REQUIRE: NETWORKING
6
# KEYWORD:
7
#
8
# Add the following lines to /etc/rc.conf to enable %%PORTNAME%%:
9
# %%PORTNAME%%_enable="YES"
10
#
11
# %%PORTNAME%%_enable (bool):		Set to YES to enable %%PORTNAME%%
12
#					Default: NO
13
# %%PORTNAME%%_bind (str):		HTTP server host
14
#					Default: localhost
15
# %%PORTNAME%%_listen (str):	HTTP server listen port
16
#					Default: 8081
17
# %%PORTNAME%%_user (str):		%%PORTNAME%% daemon user
18
#					Default: %%PGWEBUSER%%
19
# %%PORTNAME%%_group (str):		%%PORTNAME%% daemon group
20
#					Default: %%PGWEBGROUP%%
21
22
. /etc/rc.subr
23
24
name="%%PORTNAME%%"
25
rcvar="%%PORTNAME%%_enable"
26
load_rc_config $name
27
28
: ${%%PORTNAME%%_user:="www"}
29
: ${%%PORTNAME%%_group:="www"}
30
: ${%%PORTNAME%%_enable:="NO"}
31
: ${%%PORTNAME%%_bind:="localhost"}
32
: ${%%PORTNAME%%_flags=""}
33
: ${%%PORTNAME%%_facility:="daemon"}
34
: ${%%PORTNAME%%_priority:="debug"}
35
: ${%%PORTNAME%%_listen:="8081"}
36
37
procname="%%PREFIX%%/bin/${name}"
38
pidfile="/var/run/${name}.pid"
39
start_precmd="${name}_precmd"
40
command=/usr/sbin/daemon
41
command_args="-S -l ${%%PORTNAME%%_facility} -s ${%%PORTNAME%%_priority} -T ${name} -t ${name} -p ${pidfile} \
42
	${procname} --bind=${%%PORTNAME%%_bind} --listen=${%%PORTNAME%%_listen} ${%%PORTNAME%%_flags}"
43
44
%%PORTNAME%%_precmd()
45
{
46
	install -o ${%%PORTNAME%%_user} /dev/null ${pidfile}
47
}
48
49
run_rc_command "$1"
50
(-)b/databases/go-pgweb/files/pkg-message.in (+22 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
5
To run Pgweb at startup, enable it in your /etc/rc.conf:
6
sysrc pgweb_enable="YES"
7
8
To start Pgweb:
9
service pgweb start
10
11
Pgweb will listen on port 8081 and bind to localhost.  
12
This can be changed by setting "pgweb_bind" and "pgweb_listen" 
13
in /etc/rc.conf.
14
15
sysrc pgweb_bind="0.0.0.0" pgweb_listen="80"
16
17
Additional options can be set using "pgweb_flags". See 'pgweb --help' for a list
18
of all options.
19
20
EOM
21
}
22
]

Return to bug 257074