MFH: r503784 r503787

Bumped seahub version for init script to fix gunicorn binary name
Fix checksum due to retagged version

Change currently unused init var seahub_host so
there is no breakage for current users of seahub.

Change hard coded 0.0.0.0 for gunicorn start to
seahub_host.

PR:		237366 237367
Approved by:	ports-secteam (joneum)
This commit is contained in:
Richard Gallamore 2019-06-10 17:08:16 +00:00
parent 64a47d110e
commit 7ff71f7d57
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2019Q2/; revision=503918
4 changed files with 10 additions and 8 deletions

View File

@ -27,4 +27,5 @@ SUB_LIST+= USERS=${USERS} \
GROUPS=${GROUPS} \
SEAFILE_SERVER=${SEAFILE_SERVER} \
HAIWENDIR=${HAIWENDIR} \
PYTHON=${PYTHON_VERSION}
PYTHON=${PYTHON_VERSION} \
PYTHON_VER=${PYTHON_VER}

View File

@ -4,6 +4,7 @@ PORTNAME= seahub
DISTVERSIONPREFIX= v
DISTVERSION= ${SEAHUB_VER}
DISTVERSIONSUFFIX= -pro
PORTREVISION= 2
CATEGORIES= www
MAINTAINER= ultima@FreeBSD.org

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1552690870
SHA256 (haiwen-seahub-v6.3.13-pro_GH0.tar.gz) = 189e8a1b73db2ec164ff505e4bb52efe0401f8a01bae415667bedea4ade84e25
SIZE (haiwen-seahub-v6.3.13-pro_GH0.tar.gz) = 26059355
TIMESTAMP = 1560056509
SHA256 (haiwen-seahub-v6.3.13-pro_GH0.tar.gz) = ed5aea17d7b727a094b9702c222842aafd2e7a9fd019469fa7b167df3048c26d
SIZE (haiwen-seahub-v6.3.13-pro_GH0.tar.gz) = 26060069

View File

@ -29,7 +29,7 @@
# seafile_logdir (str): Set to "" by default will use the path
# %%PREFIX%%/%%HAIWENDIR%%/logs.
# Set it to a different path.
# seahub_host (int): Default is 127.0.0.1.
# seahub_host (int): Default is 0.0.0.0.
# seahub_port (int): Default is 8000.
. /etc/rc.subr
@ -53,11 +53,11 @@ clearsessions_cmd="seahub_clearsessions"
: ${seafile_conf:="%%PREFIX%%/%%HAIWENDIR%%/conf"}
: ${seafile_datadir:="`cat ${seafile_ccnet}/seafile.ini 2>/dev/null`"}
: ${seafile_logdir:="%%PREFIX%%/%%HAIWENDIR%%/logs"}
: ${seahub_host:="127.0.0.1"}
: ${seahub_host:="0.0.0.0"}
: ${seahub_port:="8000"}
manage_py=${seafile_path}/seahub/manage.py
gunicorn_exe=%%PREFIX%%/bin/gunicorn
gunicorn_exe=%%PREFIX%%/bin/gunicorn-%%PYTHON_VER%%
gunicorn_conf=${seafile_conf}/gunicorn.conf
pidfile=%%PREFIX%%/%%HAIWENDIR%%/pids/seahub.pid
@ -123,7 +123,7 @@ seahub_start()
check_required_before;
before_start;
echo "Starting seahub at port ${seahub_port} ..."
su -m "${seafile_user}" -c "$command \"${gunicorn_exe}\" seahub.wsgi:application -c \"${gunicorn_conf}\" -b \"0.0.0.0:${seahub_port}\" --preload --chdir \"$seafile_path/seahub\""
su -m "${seafile_user}" -c "$command \"${gunicorn_exe}\" seahub.wsgi:application -c \"${gunicorn_conf}\" -b \"${seahub_host}:${seahub_port}\" --preload --chdir \"$seafile_path/seahub\""
# Ensure seahub is started successfully
sleep 5