Fix in change port ssh

This commit is contained in:
absurdo 2023-08-29 23:55:17 +02:00
parent 488ad959c0
commit 80dca39117

View file

@ -60,14 +60,14 @@ class ServerTask(Task):
if arr_server:
#dbserver.insert({'server_id': arr_server['id'], 'access_ip': self.data['ip']})
server.query('update serverdbtask set ssh_port=%s WHERE id=%s', [arr_server['id']])
serverdb.query('update serverdbtask set ssh_port=%s WHERE id=%s', [self.data['ssh_port'], arr_server['id']])
return True
def pre_task(self):
self.commands_to_execute=[['modules/pastafari2/scripts/system/ssh/change_ssh_port.py', '--port=%s' % (self.data['ssh_port'])]]
self.commands_to_execute=[['modules/pastafari2/scripts/system/ssh/change_ssh_port.py', '--ssh_port=%s' % (self.data['ssh_port'])]]
return True