mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
if no args, try to bind 80 and 443 as well
This commit is contained in:
parent
c69e8d5bf4
commit
19161425f3
|
@ -20,7 +20,7 @@ import threading
|
|||
import traceback
|
||||
from textwrap import dedent
|
||||
|
||||
from .__init__ import E, WINDOWS, VT100, PY2, unicode
|
||||
from .__init__ import E, WINDOWS, ANYWIN, VT100, PY2, unicode
|
||||
from .__version__ import S_VERSION, S_BUILD_DT, CODENAME
|
||||
from .svchub import SvcHub
|
||||
from .util import py_desc, align_tab, IMPLICATIONS, ansi_re
|
||||
|
@ -495,6 +495,12 @@ def main(argv=None):
|
|||
argv[idx] = nk
|
||||
time.sleep(2)
|
||||
|
||||
try:
|
||||
if len(argv) == 1 and (ANYWIN or not os.geteuid()):
|
||||
argv.extend(["-p80,443,3923", "--ign-ebind"])
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
al = run_argparse(argv, RiceFormatter)
|
||||
except AssertionError:
|
||||
|
|
|
@ -1000,7 +1000,7 @@ class AuthSrv(object):
|
|||
v, _ = vfs.get("/", "*", False, True)
|
||||
if self.warn_anonwrite and os.getcwd() == v.realpath:
|
||||
self.warn_anonwrite = False
|
||||
msg = "anyone can read/write the current directory: {}"
|
||||
msg = "anyone can read/write the current directory: {}\n"
|
||||
self.log(msg.format(v.realpath), c=1)
|
||||
except Pebkac:
|
||||
self.warn_anonwrite = True
|
||||
|
|
|
@ -104,16 +104,16 @@ class SvcHub(object):
|
|||
if not failed:
|
||||
return
|
||||
|
||||
m = "{}/{} workers failed to start"
|
||||
m = m.format(failed, expected)
|
||||
self.log("root", m, 1)
|
||||
|
||||
if self.args.ign_ebind_all:
|
||||
return
|
||||
|
||||
if self.args.ign_ebind and self.tcpsrv.srv:
|
||||
return
|
||||
|
||||
m = "{}/{} workers failed to start"
|
||||
m = m.format(failed, expected)
|
||||
self.log("root", m, 1)
|
||||
|
||||
self.retcode = 1
|
||||
os.kill(os.getpid(), signal.SIGTERM)
|
||||
|
||||
|
|
|
@ -501,7 +501,7 @@ function Donut(uc, st) {
|
|||
|
||||
if (r.eta) {
|
||||
if (r.eta < 10) {
|
||||
fg = '#f4b';
|
||||
fg = '#fa0';
|
||||
fsz = 72;
|
||||
}
|
||||
rc = 8;
|
||||
|
|
Loading…
Reference in a new issue