Add vpnc_script location, fix #336

This commit is contained in:
Kevin Yue 2024-03-16 12:05:09 +08:00
parent 59dee3d767
commit a00f6a8cba

View File

@ -1,12 +1,13 @@
use is_executable::IsExecutable; use is_executable::IsExecutable;
use std::path::Path; use std::path::Path;
const VPNC_SCRIPT_LOCATIONS: [&str; 5] = [ const VPNC_SCRIPT_LOCATIONS: [&str; 6] = [
"/usr/local/share/vpnc-scripts/vpnc-script", "/usr/local/share/vpnc-scripts/vpnc-script",
"/usr/local/sbin/vpnc-script", "/usr/local/sbin/vpnc-script",
"/usr/share/vpnc-scripts/vpnc-script", "/usr/share/vpnc-scripts/vpnc-script",
"/usr/sbin/vpnc-script", "/usr/sbin/vpnc-script",
"/etc/vpnc/vpnc-script", "/etc/vpnc/vpnc-script",
"/etc/openconnect/vpnc-script"
]; ];
pub(crate) fn find_default_vpnc_script() -> Option<String> { pub(crate) fn find_default_vpnc_script() -> Option<String> {