1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 23:48:47 +00:00

new pro scripts

This commit is contained in:
skywalker
2021-12-03 16:53:27 +08:00
parent b6d251e44f
commit 5a8ca8737f
41 changed files with 4047 additions and 36 deletions

23
scripts/check-db-type.py Normal file
View File

@@ -0,0 +1,23 @@
import sys
from configparser import ConfigParser
if len(sys.argv) != 2:
print('check-db-type.py <seafile-config-file>', 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')