Set correct ownership on HOSTNAME file

This commit is contained in:
Jose Diaz-Gonzalez
2020-07-13 21:08:47 -04:00
committed by GitHub
parent da12a8c835
commit aba5d03632

View File

@@ -162,9 +162,13 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
except OSError:
pass
with open('{0}/HOSTNAME'.format(dokku_root), 'w') as f:
hostname_filename = '{0}/HOSTNAME'.format(dokku_root)
with open(hostname_filename, 'w') as f:
f.write(params['hostname'].value)
shutil.chown(hostname_filename, dokku_user, dokku_group)
for (index, key) in enumerate(params['keys'].value.splitlines(), 1):
user = 'admin'
if self.admin_user_exists() is not None: