Only run the daemon if this is the main module

main
Bob Mottram 2020-09-03 10:22:23 +01:00
parent 605be761ff
commit ed2aafc8cf
1 changed files with 19 additions and 18 deletions

View File

@ -1819,21 +1819,22 @@ if YTDomain:
if setTheme(baseDir, themeName):
print('Theme set to ' + themeName)
runDaemon(args.blogsinstance, args.mediainstance,
args.maxRecentPosts,
not args.nosharedinbox,
registration, args.language, __version__,
instanceId, args.client, baseDir,
domain, onionDomain, i2pDomain,
args.YTReplacementDomain,
port, proxyPort, httpPrefix,
federationList, args.maxMentions,
args.maxEmoji, args.authenticatedFetch,
args.noreply, args.nolike, args.nopics,
args.noannounce, args.cw, ocapAlways,
proxyType, args.maxReplies,
args.domainMaxPostsPerDay,
args.accountMaxPostsPerDay,
args.allowdeletion, debug, False,
args.instanceOnlySkillsSearch, [],
args.blurhash, not args.noapproval)
if __name__ == "__main__":
runDaemon(args.blogsinstance, args.mediainstance,
args.maxRecentPosts,
not args.nosharedinbox,
registration, args.language, __version__,
instanceId, args.client, baseDir,
domain, onionDomain, i2pDomain,
args.YTReplacementDomain,
port, proxyPort, httpPrefix,
federationList, args.maxMentions,
args.maxEmoji, args.authenticatedFetch,
args.noreply, args.nolike, args.nopics,
args.noannounce, args.cw, ocapAlways,
proxyType, args.maxReplies,
args.domainMaxPostsPerDay,
args.accountMaxPostsPerDay,
args.allowdeletion, debug, False,
args.instanceOnlySkillsSearch, [],
args.blurhash, not args.noapproval)