mirror of
https://github.com/joshuaboniface/rffmpeg.git
synced 2026-01-23 02:24:03 +00:00
allow multiple ssh users
Different users on multiple servers were not possible because you had to set a specific user. I changed that so that setting no user in rffmpeg.yml and configuring the ssh config with a user works instead. If you have configured a specific user, this won't break your setup and disables the feature.
This commit is contained in:
parent
4f41b334ef
commit
196bbeee4d
1 changed files with 3 additions and 1 deletions
4
rffmpeg
4
rffmpeg
|
|
@ -183,7 +183,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"]
|
||||
)
|
||||
|
|
@ -360,6 +360,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:
|
||||
|
|
@ -451,6 +452,7 @@ def run_remote_ffmpeg(
|
|||
Run ffmpeg 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_ffmpeg_command = list()
|
||||
|
||||
# Add any pre commands
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue