📜  华硕路由器 NVRAM 脚本 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:26.946000             🧑  作者: Mango

代码示例1
#!/bin/sh

    echo "Removing unused cert/key from nvram..."

    for i in 1 2 3 4 5
    do
       nvram unset vpn_crt_client$i\_ca
       nvram unset vpn_crt_client$i\_extra
       nvram unset vpn_crt_client$i\_crt
       nvram unset vpn_crt_client$i\_key
       nvram unset vpn_crt_client$i\_crl
       nvram unset vpn_crt_client$i\_static
    done

    for i in 1 2
    do
       nvram unset vpn_crt_server$i\_ca
       nvram unset vpn_crt_server$i\_dh
       nvram unset vpn_crt_server$i\_ca_key
       nvram unset vpn_crt_server$i\_extra
       nvram unset vpn_crt_server$i\_client_crt
       nvram unset vpn_crt_server$i\_crl
       nvram unset vpn_crt_server$i\_crt
       nvram unset vpn_crt_server$i\_key
       nvram unset vpn_crt_server$i\_static
       nvram unset vpn_crt_server$i\_client_key
    done

    nvram commit

    echo "done."