Browse Source

Allow setting inet_exposure from command line

Closes #1872
pull/1876/head
Safihre 4 years ago
parent
commit
b5ce0e0766
  1. 11
      SABnzbd.py

11
SABnzbd.py

@ -206,6 +206,7 @@ def print_help():
print(" with full data reconstruction")
print(" --https <port> Port to use for HTTPS server")
print(" --ipv6_hosting <0|1> Listen on IPv6 address [::1] [*]")
print(" --inet_exposure <0..5> Set external internet access [*]")
print(" --no-login Start with username and password reset")
print(" --log-all Log all article handling (for developers)")
print(" --disable-file-log Logging is only written to console")
@ -778,10 +779,9 @@ def commandline_handler():
"server=",
"templates",
"ipv6_hosting=",
"template2",
"inet_exposure=",
"browser=",
"config-file=",
"force",
"disable-file-log",
"version",
"https=",
@ -872,6 +872,7 @@ def main():
pid_file = None
new_instance = False
ipv6_hosting = None
inet_exposure = None
_service, sab_opts, _serv_opts, upload_nzbs = commandline_handler()
@ -951,6 +952,8 @@ def main():
new_instance = True
elif opt == "--ipv6_hosting":
ipv6_hosting = arg
elif opt == "--inet_exposure":
inet_exposure = arg
sabnzbd.MY_FULLNAME = os.path.normpath(os.path.abspath(sabnzbd.MY_FULLNAME))
sabnzbd.MY_NAME = os.path.basename(sabnzbd.MY_FULLNAME)
@ -1362,6 +1365,10 @@ def main():
sabnzbd.cfg.username.set("")
sabnzbd.cfg.password.set("")
# Overwrite inet_exposure from command-line for VPS-setups
if inet_exposure:
sabnzbd.cfg.inet_exposure.set(inet_exposure)
mime_gzip = (
"text/*",
"application/javascript",

Loading…
Cancel
Save