Przeglądaj źródła

Override imapfilter's certificate storage

Alois Mahdal 7 lat temu
rodzic
commit
34be2a13e6
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8
    1
      src/imapdomo.skel

+ 8
- 1
src/imapdomo.skel Wyświetl plik

@@ -49,6 +49,10 @@ mkcmd() {
49 49
         echo -n "  -v"
50 50
     fi
51 51
     echo -n "  -c $IMAPDOMO_HOME/main.lua"
52
+    if test -n "$Certs"
53
+    then
54
+        echo -n " -t $Certs"
55
+    fi
52 56
 }
53 57
 
54 58
 show_version() {
@@ -77,14 +81,17 @@ main() {
77 81
     local LogDir    # directory to store logs
78 82
     local HeaderDir # directory to store headers by save_header()
79 83
     local CdTo      # change dir to this before running imapfilter
84
+    local Certs     # certificate storage
80 85
     CfgDir="$IMAPDOMO_CFGDIR"
81 86
     LogDir="$IMAPDOMO_USER_CACHE/logs"
82 87
     HeaderDir="$IMAPDOMO_USER_CACHE/headers"
88
+    Certs="$IMAPDOMO_CFGDIR/certificates"
83 89
     Debug=false
84 90
     #shellcheck disable=SC2034
85 91
     while true; do case $1 in
86
-        -c) CdTo="$2"; shift 2 || usage -w "missing value to: $1" ;;
92
+        -c) CdTo="$2";  shift 2 || usage -w "missing value to: $1" ;;
87 93
         -d) Debug=true; PRETTY_DEBUG=true; shift ;;
94
+        -t) Certs="$2"; shift 2 || usage -w "missing value to: $1" ;;
88 95
         -l) lshandlers; exit ;;
89 96
         -V|--version-semver) show_semversion ;;
90 97
         --version) show_version ;;