From 8dc75bc553cd6237e0dbedaae7310e9c8df9099a Mon Sep 17 00:00:00 2001 From: shim_ <> Date: Sat, 3 Nov 2018 21:11:55 +0100 Subject: [PATCH] improved commands --- scripts/seafile-server.sh | 6 ++++++ scripts/upgrade.py | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/seafile-server.sh b/scripts/seafile-server.sh index 95a94eb..c9bbc3c 100755 --- a/scripts/seafile-server.sh +++ b/scripts/seafile-server.sh @@ -115,6 +115,12 @@ case "$1" in ;; maintanance) $0 stop + if [ "$2" = "--fsck" ]; then + $LATEST/seaf-fsck.sh + fi + if [ "$2" = "--fsck-repair" ]; then + $LATEST/seaf-fsck.sh --repair + fi $LATEST/seaf-gc.sh $0 start ;; diff --git a/scripts/upgrade.py b/scripts/upgrade.py index ae92797..91e4c7c 100755 --- a/scripts/upgrade.py +++ b/scripts/upgrade.py @@ -58,8 +58,7 @@ def perform_upgrade_command(version,mysql=False,yes=True): print len(current) == 1 and current[0] == 0 if len(current) == 1 and current[0] == 0: #Not installed print("Running installer.") - installer = os.path.join(seaf_home,"seafile-server-%s" % version,"setup-seafile%s.sh" % ("-mysql" if mysql else "")) - if not call(["seafile-server","setup"],stdout=sys.stdout, stdin=sys.stdin): + if not call(["seafile-server","setup", os.path.join(seaf_home,"seafile-server-%s" % version) ],stdout=sys.stdout, stdin=sys.stdin): sys.exit(1) sys.exit(126) script_re = "^upgrade_(\d+).(\d+)_(\d+).(\d+)\.sh$"