]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/config/acme/mod.rs
completion: ACME plugin type: comment out http type for now, not useful
[proxmox-backup.git] / src / config / acme / mod.rs
index 4fca9b10a9b61940278115c359b84a69f3b1343d..ca2d96718c83f1c07d83787f3062b2b8d0df4d5a 100644 (file)
@@ -95,34 +95,6 @@ where
     }
 }
 
-/// Run a function for each DNS plugin ID.
-pub fn foreach_dns_plugin<F>(mut func: F) -> Result<(), Error>
-where
-    F: FnMut(&str) -> ControlFlow<Result<(), Error>>,
-{
-    match crate::tools::fs::read_subdir(-1, "/usr/share/proxmox-acme/dnsapi") {
-        Ok(files) => {
-            for file in files.filter_map(Result::ok) {
-                if let Some(id) = file
-                    .file_name()
-                    .to_str()
-                    .ok()
-                    .and_then(|name| name.strip_prefix("dns_"))
-                    .and_then(|name| name.strip_suffix(".sh"))
-                {
-                    if let ControlFlow::Break(result) = func(id) {
-                        return result;
-                    }
-                }
-            }
-
-            Ok(())
-        }
-        Err(err) if err.not_found() => Ok(()),
-        Err(err) => Err(err.into()),
-    }
-}
-
 pub fn mark_account_deactivated(name: &str) -> Result<(), Error> {
     let from = account_path(name);
     for i in 0..100 {
@@ -184,5 +156,8 @@ pub fn complete_acme_plugin(_arg: &str, _param: &HashMap<String, String>) -> Vec
 }
 
 pub fn complete_acme_plugin_type(_arg: &str, _param: &HashMap<String, String>) -> Vec<String> {
-    vec!["dns".to_string(), "http".to_string()]
+    vec![
+        "dns".to_string(),
+        //"http".to_string(), // makes currently not realyl sense to create or the like
+    ]
 }