--- a/borgend.py Sun Jan 28 14:56:13 2018 +0000 +++ b/borgend.py Sun Jan 28 17:34:06 2018 +0000 @@ -73,15 +73,9 @@ b=Backup(i, backupconfigs[i], scheduler) backups.append(b) - for r in repos: - r.start() - - for b in backups: - b.start() - if args.notray or platform.system()!='Darwin': # Wait for scheduler to finish - scheduler.join() + run=scheduler.join else: # This is needed for Ctrl+C to work. # TODO: proper exit handler, which seems to require @@ -91,7 +85,15 @@ # Start UI, and let it handle exit control from borgend.ui import BorgendTray tray=BorgendTray(backups); - tray.run() + run=tray.run + + for r in repos: + r.start() + + for b in backups: + b.start() + + run() except Exception as err: # TODO: Should write errors here to stderr;