diff --git a/scripts/build/build-pro.py b/scripts/build/build-pro.py index 89ae132f6d..7b9b957cd5 100755 --- a/scripts/build/build-pro.py +++ b/scripts/build/build-pro.py @@ -784,7 +784,6 @@ def copy_scripts_and_libs(): must_copy( os.path.join(scripts_srcdir, 'seafile-background-tasks.sh'), serverdir) must_copy(os.path.join(scripts_srcdir, 'check_init_admin.py'), serverdir) - must_copy(os.path.join(scripts_srcdir, 'check-db-type.py'), serverdir) # Command line for real-time backup server must_copy(os.path.join(scripts_srcdir, 'seaf-backup-cmd.py'), serverdir) diff --git a/scripts/check-db-type.py b/scripts/check-db-type.py deleted file mode 100644 index daf2f67703..0000000000 --- a/scripts/check-db-type.py +++ /dev/null @@ -1,23 +0,0 @@ -import sys -from configparser import ConfigParser - -if len(sys.argv) != 2: - print('check-db-type.py ', file=sys.stderr) - -seafile_conf_file = sys.argv[1] - -parser = ConfigParser() -parser.read(seafile_conf_file) - -if not parser.has_option('database', 'type'): - print('sqlite') -else: - db_type = parser.get('database', 'type') - if db_type == 'sqlite': - print('sqlite') - elif db_type == 'mysql': - print('mysql') - elif db_type == 'pgsql': - print('pgsql') - else: - print('unknown') diff --git a/scripts/seaf-gc.sh b/scripts/seaf-gc.sh index 06fb97d998..8bd93c9f47 100755 --- a/scripts/seaf-gc.sh +++ b/scripts/seaf-gc.sh @@ -8,7 +8,6 @@ TOPDIR=$(dirname "${INSTALLPATH}") default_ccnet_conf_dir=${TOPDIR}/ccnet default_seafile_data_dir=${TOPDIR}/seafile-data default_conf_dir=${TOPDIR}/conf -check_db_py=${INSTALLPATH}/check-db-type.py seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc seaf_gc_opts="" pro_pylibs_dir=${INSTALLPATH}/pro/python @@ -119,17 +118,6 @@ function validate_already_running () { function run_seaf_gc () { - if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then - seafile_conf=${default_conf_dir}/seafile.conf - db_type=$($PYTHON $check_db_py $seafile_conf) - - if [ $db_type = "sqlite" ]; then - validate_already_running; - fi - else - validate_already_running; - fi - validate_seafile_data_dir; set_env_config;