Fixes in tasks and updates
This commit is contained in:
parent
9efdb38e0e
commit
8e693ae7b6
2 changed files with 14 additions and 4 deletions
|
|
@ -336,8 +336,9 @@ def task(task_id):
|
|||
remote_password=arr_task['password']
|
||||
private_key=arr_task['ssh_key_priv']
|
||||
password_key=arr_task.get('ssh_key_password', '')
|
||||
port=arr_task.get('ssh_port', 22)
|
||||
|
||||
final_task=ssh_task.ServerTask(server, conn, remote_user=remote_user, remote_password=remote_password, private_key=private_key, password_key=password_key, remote_path='pastafari2', task_id=task_id, data=json.loads(arr_task['data']))
|
||||
final_task=ssh_task.ServerTask(server, conn, remote_user=remote_user, remote_password=remote_password, private_key=private_key, password_key=password_key, remote_path='pastafari2', task_id=task_id, data=json.loads(arr_task['data']), port=port)
|
||||
|
||||
final_task.exec()
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
from subprocess import call
|
||||
from time import sleep
|
||||
import distro
|
||||
import os
|
||||
|
||||
linux_distro=distro.id()
|
||||
|
||||
|
|
@ -54,6 +55,14 @@ if call("sudo /usr/local/bin/composer self-update", shell=True) > 0:
|
|||
|
||||
print('Upgrading Pastafari utils...')
|
||||
|
||||
if call("cd ./leviathanutils && git pull && composer update", shell=True) > 0:
|
||||
print('Error, cannot upgrade Leviathanutils...')
|
||||
exit(1)
|
||||
if not os.path.isdir('./leviathanutils'):
|
||||
|
||||
if call("git clone https://git.cuchulu.com/phangoapp/leviathanutils.git && composer install --working-dir=./leviathanutils", shell=True) > 0:
|
||||
print('Error, cannot install leviathanutils...')
|
||||
exit(1)
|
||||
|
||||
else:
|
||||
|
||||
if call("cd ./leviathanutils && git pull && composer update", shell=True) > 0:
|
||||
print('Error, cannot upgrade Leviathanutils...')
|
||||
exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue