Fix in change_password_user

This commit is contained in:
Antonio de la Rosa 2025-08-26 22:54:53 +02:00
parent f6910833f3
commit 17b021fa33
2 changed files with 3 additions and 3 deletions

View file

View file

@ -28,9 +28,9 @@ class ServerTask(Task):
final_ssh_pub='' final_ssh_pub=''
if self.data['ssh_pub_key']!='': if self.data['ssh_pub_key']!='':
with open('./modules/webservers/scripts/files/id_rsa.pub', 'w') as f: with open('./modules/pastafari2/scripts/system/files/id_rsa.pub', 'w') as f:
f.write(self.data['ssh_pub_key']) f.write(self.data['ssh_pub_key'])
ssh_pub_key_file='./modules/webservers/scripts/files/id_rsa.pub' ssh_pub_key_file='./modules/pastafari2/scripts/system/files/id_rsa.pub'
self.files.append([ssh_pub_key_file, 0o600]) self.files.append([ssh_pub_key_file, 0o600])
# ssh-keygen -l -f id_rsa.pub # ssh-keygen -l -f id_rsa.pub
@ -59,7 +59,7 @@ class ServerTask(Task):
def post_task(self): def post_task(self):
ssh_pub_key_file='./modules/webservers/scripts/files/id_rsa.pub' ssh_pub_key_file='./modules/pastafari2/scripts/system/files/id_rsa.pub'
if os.path.isfile(ssh_pub_key_file): if os.path.isfile(ssh_pub_key_file):
os.unlink(ssh_pub_key_file) os.unlink(ssh_pub_key_file)