Merge pull request #67 from bmartin5692/fix-66
create passwd file if it doesnt exist
This commit is contained in:
commit
3aefbe2fd8
2 changed files with 6 additions and 1 deletions
|
|
@ -321,6 +321,11 @@ def main(argv=None):
|
|||
first_run()
|
||||
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.add_argument(
|
||||
"--listen", type=str, default=None, help="start serving on address"
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ class MQTTServer:
|
|||
"auth": {
|
||||
"allow-anonymous": False,
|
||||
"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
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue