mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-21 10:51:17 +00:00
fix scripts IS_PRO_SEAFEVENTS
This commit is contained in:
@@ -11,6 +11,8 @@ default_conf_dir=${TOPDIR}/conf
|
|||||||
check_db_py=${INSTALLPATH}/check-db-type.py
|
check_db_py=${INSTALLPATH}/check-db-type.py
|
||||||
seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc
|
seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc
|
||||||
seaf_gc_opts=""
|
seaf_gc_opts=""
|
||||||
|
pro_pylibs_dir=${INSTALLPATH}/pro/python
|
||||||
|
IS_PRO_SEAFEVENTS=`awk '/is_pro/{getline;print $2;exit}' ${pro_pylibs_dir}/seafevents/seafevents_api.py`
|
||||||
|
|
||||||
export PATH=${INSTALLPATH}/seafile/bin:$PATH
|
export PATH=${INSTALLPATH}/seafile/bin:$PATH
|
||||||
export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
|
export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
|
||||||
@@ -18,7 +20,7 @@ export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafil
|
|||||||
script_name=$0
|
script_name=$0
|
||||||
function usage () {
|
function usage () {
|
||||||
echo "usage : "
|
echo "usage : "
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then
|
||||||
echo "$(basename ${script_name}) [--dry-run | -D] [--rm-deleted | -r] [--rm-fs | -R] [repo-id1] [repo-id2]"
|
echo "$(basename ${script_name}) [--dry-run | -D] [--rm-deleted | -r] [--rm-fs | -R] [repo-id1] [repo-id2]"
|
||||||
else
|
else
|
||||||
echo "$(basename ${script_name}) [--dry-run | -D] [--rm-deleted | -r] [repo-id1] [repo-id2]"
|
echo "$(basename ${script_name}) [--dry-run | -D] [--rm-deleted | -r] [repo-id1] [repo-id2]"
|
||||||
@@ -88,7 +90,7 @@ function validate_already_running () {
|
|||||||
|
|
||||||
function run_seaf_gc () {
|
function run_seaf_gc () {
|
||||||
|
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then
|
||||||
seafile_conf=${default_conf_dir}/seafile.conf
|
seafile_conf=${default_conf_dir}/seafile.conf
|
||||||
db_type=$($PYTHON $check_db_py $seafile_conf)
|
db_type=$($PYTHON $check_db_py $seafile_conf)
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ central_config_dir=${TOPDIR}/conf
|
|||||||
seaf_controller="${INSTALLPATH}/seafile/bin/seafile-controller"
|
seaf_controller="${INSTALLPATH}/seafile/bin/seafile-controller"
|
||||||
pro_pylibs_dir=${INSTALLPATH}/pro/python
|
pro_pylibs_dir=${INSTALLPATH}/pro/python
|
||||||
seafesdir=$pro_pylibs_dir/seafes
|
seafesdir=$pro_pylibs_dir/seafes
|
||||||
|
IS_PRO_SEAFEVENTS=`awk '/is_pro/{getline;print $2;exit}' ${pro_pylibs_dir}/seafevents/seafevents_api.py`
|
||||||
|
|
||||||
export PATH=${INSTALLPATH}/seafile/bin:$PATH
|
export PATH=${INSTALLPATH}/seafile/bin:$PATH
|
||||||
export ORIG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
|
export ORIG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
|
||||||
@@ -113,7 +114,7 @@ function start_seafile_server () {
|
|||||||
validate_seafile_data_dir;
|
validate_seafile_data_dir;
|
||||||
validate_running_user;
|
validate_running_user;
|
||||||
|
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then
|
||||||
test_config;
|
test_config;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -121,7 +122,7 @@ function start_seafile_server () {
|
|||||||
|
|
||||||
mkdir -p $TOPDIR/logs
|
mkdir -p $TOPDIR/logs
|
||||||
|
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then
|
||||||
if ! LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_controller} -c "${default_ccnet_conf_dir}" -d "${default_seafile_data_dir}" -F "${central_config_dir}"; then
|
if ! LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_controller} -c "${default_ccnet_conf_dir}" -d "${default_seafile_data_dir}" -F "${central_config_dir}"; then
|
||||||
controller_log="$default_seafile_data_dir/controller.log"
|
controller_log="$default_seafile_data_dir/controller.log"
|
||||||
echo
|
echo
|
||||||
|
@@ -29,6 +29,7 @@ gunicorn_exe=${INSTALLPATH}/seahub/thirdpart/bin/gunicorn
|
|||||||
pro_pylibs_dir=${INSTALLPATH}/pro/python
|
pro_pylibs_dir=${INSTALLPATH}/pro/python
|
||||||
seafesdir=$pro_pylibs_dir/seafes
|
seafesdir=$pro_pylibs_dir/seafes
|
||||||
seahubdir=${INSTALLPATH}/seahub
|
seahubdir=${INSTALLPATH}/seahub
|
||||||
|
IS_PRO_SEAFEVENTS=`awk '/is_pro/{getline;print $2;exit}' ${pro_pylibs_dir}/seafevents/seafevents_api.py`
|
||||||
|
|
||||||
script_name=$0
|
script_name=$0
|
||||||
function usage () {
|
function usage () {
|
||||||
@@ -150,7 +151,7 @@ function before_start() {
|
|||||||
validate_seahub_running;
|
validate_seahub_running;
|
||||||
prepare_seahub_log_dir;
|
prepare_seahub_log_dir;
|
||||||
|
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then
|
||||||
if [[ -z "$LANG" ]]; then
|
if [[ -z "$LANG" ]]; then
|
||||||
echo "LANG is not set in ENV, set to en_US.UTF-8"
|
echo "LANG is not set in ENV, set to en_US.UTF-8"
|
||||||
export LANG='en_US.UTF-8'
|
export LANG='en_US.UTF-8'
|
||||||
|
@@ -9,6 +9,8 @@ default_seahub_db=${TOPDIR}/seahub.db
|
|||||||
default_conf_dir=${TOPDIR}/conf
|
default_conf_dir=${TOPDIR}/conf
|
||||||
default_pids_dir=${TOPDIR}/pids
|
default_pids_dir=${TOPDIR}/pids
|
||||||
default_logs_dir=${TOPDIR}/logs
|
default_logs_dir=${TOPDIR}/logs
|
||||||
|
pro_pylibs_dir=${INSTALLPATH}/pro/python
|
||||||
|
IS_PRO_SEAFEVENTS=`awk '/is_pro/{getline;print $2;exit}' ${pro_pylibs_dir}/seafevents/seafevents_api.py`
|
||||||
|
|
||||||
export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
|
export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
|
||||||
|
|
||||||
@@ -16,7 +18,7 @@ server_manual_http='https://download.seafile.com/published/seafile-manual/home.m
|
|||||||
|
|
||||||
function welcome () {
|
function welcome () {
|
||||||
echo "-----------------------------------------------------------------"
|
echo "-----------------------------------------------------------------"
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then
|
||||||
echo "This script will guide you to config and setup your seafile professional server."
|
echo "This script will guide you to config and setup your seafile professional server."
|
||||||
else
|
else
|
||||||
echo "This script will guide you to config and setup your seafile server."
|
echo "This script will guide you to config and setup your seafile server."
|
||||||
|
Reference in New Issue
Block a user