Merge pull request #67 from Sim0nW0lf/rffmpeg-multiple-SSH-users

This commit is contained in:
Joshua M. Boniface 2023-08-16 22:00:43 -04:00 committed by GitHub
commit a2422187b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,7 +184,7 @@ def load_config():
config["dir_group"] = config_directories.get("group", "sudo")
# Parse the keys from the remote group
config["remote_user"] = config_remote.get("user", "jellyfin")
config["remote_user"] = config_remote.get("user", "")
config["remote_args"] = config_remote.get(
"args", ["-i", "/var/lib/jellyfin/.ssh/id_rsa"]
)
@ -361,6 +361,7 @@ def get_target_host(config):
log.debug("Running SSH test")
test_ssh_command = generate_ssh_command(config, host["hostname"])
test_ssh_command.remove("-q")
test_ssh_command = [arg.replace('@', '', 1) if arg.startswith('@') else arg for arg in test_ssh_command]
test_ffmpeg_command = [config["ffmpeg_command"], "-version"]
ret = run_command(test_ssh_command + test_ffmpeg_command, PIPE, PIPE, PIPE)
if ret.returncode != 0:
@ -455,6 +456,8 @@ def run_remote_command(
Run command against the remote target_hostname.
"""
rffmpeg_ssh_command = generate_ssh_command(config, target_hostname)
rffmpeg_ssh_command = [arg.replace('@', '', 1) if arg.startswith('@') else arg for arg in rffmpeg_ssh_command]
rffmpeg_command = list()
# Add any pre commands