improved commands

This commit is contained in:
shim_ 2018-11-03 21:11:55 +01:00
parent 6250c23295
commit 8dc75bc553
2 changed files with 7 additions and 2 deletions

View File

@ -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
;;

View File

@ -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$"