This commit is contained in:
@@ -4,7 +4,8 @@ use crate::{
|
||||
config::{SshConfigManager, SshCredentials, SshOPNSenseShell},
|
||||
error::Error,
|
||||
modules::{
|
||||
caddy::CaddyConfig, dhcp_legacy::DhcpConfigLegacyISC, dns::DnsConfig, dnsmasq::DhcpConfigDnsMasq, load_balancer::LoadBalancerConfig, tftp::TftpConfig
|
||||
caddy::CaddyConfig, dhcp_legacy::DhcpConfigLegacyISC, dns::DnsConfig,
|
||||
dnsmasq::DhcpConfigDnsMasq, load_balancer::LoadBalancerConfig, tftp::TftpConfig,
|
||||
},
|
||||
};
|
||||
use log::{debug, info, trace, warn};
|
||||
|
||||
@@ -159,11 +159,7 @@ impl SshOPNSenseShell {
|
||||
wait_for_completion(&mut channel).await
|
||||
}
|
||||
|
||||
async fn ensure_remote_dir_exists(
|
||||
&self,
|
||||
sftp: &SftpSession,
|
||||
path: &str,
|
||||
) -> Result<(), Error> {
|
||||
async fn ensure_remote_dir_exists(&self, sftp: &SftpSession, path: &str) -> Result<(), Error> {
|
||||
if !sftp.try_exists(path).await? {
|
||||
info!("Creating remote directory {path}");
|
||||
sftp.create_dir(path).await?;
|
||||
|
||||
Reference in New Issue
Block a user