1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

devel/fossil: add fossil_https rc.conf setting

When the rc.conf fossil_https is set to a non-empty string, the --https
parameter is added to the fossil serve command line to force HTTPS
communication.

PR:		229200
Submitted by:	Oleh Hushchenkov <gor@clogic.com.ua>
This commit is contained in:
Pietro Cerutti 2018-06-22 08:06:05 +00:00
parent d7ec60f5a5
commit 1eb9e73083
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473020
2 changed files with 14 additions and 9 deletions

View File

@ -2,8 +2,8 @@
PORTNAME= fossil
PORTVERSION= 2.6
PORTREVISION= 0
DISTVERSIONPREFIX= src-
PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= devel www
MASTER_SITES= http://fossil-scm.org/index.html/uv/

View File

@ -18,6 +18,7 @@
# fossil_baseurl=""
# fossil_proto="http"
# fossil_listenall=""
# fossil_https="" # force the HTTPS CGI parameter to "on"
# fossil_files="" # comma separated globing patterns of files to serve
# fossil_notfound="" # URI to redirect to in case of 404
# Use fossil_user to run fossil as user
@ -42,20 +43,24 @@ fossil_proto=${fossil_proto:-"http"}
fossil_directory=${fossil_directory:-"/nonexistent"}
case "${fossil_proto}" in
http);;
scgi) fossil_args="--scgi" ;;
*)
http)
# http is the default
;;
scgi)
fossil_args="--scgi"
;;
*)
echo "unsupported protocol: ${fossil_proto}, only scgi and http are supported" >&2
exit 1
;;
esac
[ -n "${fossil_baseurl}" ] && fossil_args="${fossil_args} --baseurl ${fossil_baseurl}"
[ -n "${fossil_baseurl}" ] && fossil_args="${fossil_args} --baseurl ${fossil_baseurl}"
[ -z "${fossil_listenall}" ] && fossil_args="${fossil_args} --localhost"
[ -n "${fossil_files}" ] && fossil_args="${fossil_args} --files '${fossil_files}'"
[ -n "${fossil_notfound}" ] && fossil_args="${fossil_args} --notfound \"${fossil_notfound}\""
[ -n "${fossil_repolist}" ] && fossil_args="${fossil_args} --repolist"
[ -n "${fossil_https}" ] && fossil_args="${fossil_args} --https"
[ -n "${fossil_files}" ] && fossil_args="${fossil_args} --files '${fossil_files}'"
[ -n "${fossil_notfound}" ] && fossil_args="${fossil_args} --notfound \"${fossil_notfound}\""
[ -n "${fossil_repolist}" ] && fossil_args="${fossil_args} --repolist"
command_args="-f -p ${pidfile} ${procname} server -P ${fossil_port} ${fossil_args} ${fossil_directory}"