create passwd file if it doesnt exist #67
2 changed files with 6 additions and 1 deletions
|
|
@ -321,6 +321,11 @@ def main(argv=None):
|
||||||
first_run()
|
first_run()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not (
|
||||||
|
os.path.exists(os.path.join(data_dir, "passwd"))
|
||||||
|
):
|
||||||
|
with open(os.path.join(data_dir, "passwd"), 'w'): pass
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--listen", type=str, default=None, help="start serving on address"
|
"--listen", type=str, default=None, help="start serving on address"
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,7 @@ class MQTTServer:
|
||||||
"auth": {
|
"auth": {
|
||||||
"allow-anonymous": False,
|
"allow-anonymous": False,
|
||||||
"password-file": os.path.join(
|
"password-file": os.path.join(
|
||||||
os.path.dirname(os.path.realpath(__file__)), "passwd"
|
os.path.join(bumper.data_dir, "passwd")
|
||||||
),
|
),
|
||||||
"plugins": ["bumper"], # No plugins == no auth
|
"plugins": ["bumper"], # No plugins == no auth
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue