create passwd file if it doesnt exist #67

Merged
bmartin5692 merged 1 commit from fix-66 into master 2019-12-27 17:19:10 +01:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit cc16a5ceb5 - Show all commits

View file

@ -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"

View file

@ -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
},