mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 19:05:16 +00:00
rm check java in scripts (#5414)
This commit is contained in:
parent
027db966a2
commit
641dc04f86
@ -550,7 +550,7 @@ class MigratingProfessionalConfigurator(ProfessionalConfigurator):
|
|||||||
ProfessionalConfigurator.__init__(self, args, migrate=True)
|
ProfessionalConfigurator.__init__(self, args, migrate=True)
|
||||||
|
|
||||||
def check_pre_condition(self):
|
def check_pre_condition(self):
|
||||||
self.check_java()
|
pass
|
||||||
|
|
||||||
def config(self):
|
def config(self):
|
||||||
self.detect_db_type()
|
self.detect_db_type()
|
||||||
@ -599,17 +599,6 @@ class MigratingProfessionalConfigurator(ProfessionalConfigurator):
|
|||||||
if Utils.run_argv(argv) != 0:
|
if Utils.run_argv(argv) != 0:
|
||||||
Utils.error('failed to update avatars folder')
|
Utils.error('failed to update avatars folder')
|
||||||
|
|
||||||
def check_java(self):
|
|
||||||
Utils.info('\nChecking java ... ', newline=False)
|
|
||||||
if not Utils.find_in_path('java'):
|
|
||||||
msg = '''\nJava is not found. instal it first.\n
|
|
||||||
On Debian/Ubuntu: apt-get install default-jre
|
|
||||||
On CentOS/RHEL: yum install jre
|
|
||||||
'''
|
|
||||||
Utils.error(msg)
|
|
||||||
|
|
||||||
Utils.info('Done')
|
|
||||||
|
|
||||||
|
|
||||||
class SetupProfessionalConfigurator(ProfessionalConfigurator):
|
class SetupProfessionalConfigurator(ProfessionalConfigurator):
|
||||||
'''This script is invokded by setup-seafile.sh/setup-seafile-mysql.sh to
|
'''This script is invokded by setup-seafile.sh/setup-seafile-mysql.sh to
|
||||||
|
@ -107,13 +107,6 @@ function validate_already_running () {
|
|||||||
check_component_running "seafevents" "seafevents.main --config-file ${central_config_dir}"
|
check_component_running "seafevents" "seafevents.main --config-file ${central_config_dir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_java {
|
|
||||||
if ! which java 2>/dev/null 1>&2; then
|
|
||||||
echo "java is not found on your machine. Please install it first."
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function start_seafile_server () {
|
function start_seafile_server () {
|
||||||
validate_already_running;
|
validate_already_running;
|
||||||
validate_central_conf_dir;
|
validate_central_conf_dir;
|
||||||
@ -122,7 +115,6 @@ function start_seafile_server () {
|
|||||||
|
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
if [[ -d ${INSTALLPATH}/pro ]]; then
|
||||||
test_config;
|
test_config;
|
||||||
test_java;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting seafile server, please wait ..."
|
echo "Starting seafile server, please wait ..."
|
||||||
|
@ -49,23 +49,8 @@ function check_python () {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_java () {
|
|
||||||
echo -n "Checking for java ..."
|
|
||||||
if ! which java 2>/dev/null 1>&2; then
|
|
||||||
echo -e "\nJava is not found. install it first.\n"
|
|
||||||
echo "On Debian/Ubuntu: apt-get install default-jre"
|
|
||||||
echo "On CentOS/RHEL: yum install jre"
|
|
||||||
err_and_quit;
|
|
||||||
fi
|
|
||||||
printf "Done.\n\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
check_python;
|
check_python;
|
||||||
|
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
|
||||||
check_java;
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PYTHON=$PYTHON
|
export PYTHON=$PYTHON
|
||||||
|
|
||||||
export PYTHONPATH=${INSTALLPATH}/seafile/lib/python3/site-packages:${INSTALLPATH}/seafile/lib64/python3/site-packages:${INSTALLPATH}/seahub/thirdpart:$PYTHONPATH
|
export PYTHONPATH=${INSTALLPATH}/seafile/lib/python3/site-packages:${INSTALLPATH}/seafile/lib64/python3/site-packages:${INSTALLPATH}/seahub/thirdpart:$PYTHONPATH
|
||||||
|
@ -152,26 +152,11 @@ function check_sqlite3 () {
|
|||||||
printf "Done.\n\n"
|
printf "Done.\n\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_java () {
|
|
||||||
echo -n "Checking for java ..."
|
|
||||||
if ! which java 2>/dev/null 1>&2; then
|
|
||||||
echo -e "\nJava is not found. install it first.\n"
|
|
||||||
echo "On Debian/Ubuntu: apt-get install default-jre"
|
|
||||||
echo "On CentOS/RHEL: yum install jre"
|
|
||||||
err_and_quit;
|
|
||||||
fi
|
|
||||||
printf "Done.\n\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
function check_system_dependency () {
|
function check_system_dependency () {
|
||||||
printf "Checking packages needed by seafile ...\n\n"
|
printf "Checking packages needed by seafile ...\n\n"
|
||||||
check_python;
|
check_python;
|
||||||
check_sqlite3;
|
check_sqlite3;
|
||||||
|
|
||||||
if [[ -d ${INSTALLPATH}/pro ]]; then
|
|
||||||
check_java;
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "Checking Done.\n\n"
|
printf "Checking Done.\n\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user