Przeglądaj źródła

fixed tarball generation

master
Robin Thoni 8 lat temu
rodzic
commit
b60f832352
1 zmienionych plików z 6 dodań i 2 usunięć
  1. 6
    2
      vpngen.py

+ 6
- 2
vpngen.py Wyświetl plik

1
+import glob
1
 import json
2
 import json
2
 import os
3
 import os
3
 import os.path
4
 import os.path
250
             dest = "%s%s-%s%s" % (client_dir, os.path.basename(split[0]), vpn_name, split[1])
251
             dest = "%s%s-%s%s" % (client_dir, os.path.basename(split[0]), vpn_name, split[1])
251
             shutil.copy(file_path, dest)
252
             shutil.copy(file_path, dest)
252
 
253
 
253
-        files_names = list(map(lambda file_path: os.path.basename(file_path), files_paths))
254
+        files_names = glob.glob("%s%s*" % (client_dir, os.sep))
255
+        files_names = list(map(lambda file_path: os.path.basename(file_path), files_names))
256
+
257
+        print(files_names)
254
 
258
 
255
         call(["tar", "cfj", self.get_client_tarball_path(vpn_name, client_name),
259
         call(["tar", "cfj", self.get_client_tarball_path(vpn_name, client_name),
256
-              "-C", self.get_easy_rsa_key_dir(vpn_name)] + files_names)
260
+              "-C", client_dir] + files_names)

Ładowanie…
Anuluj
Zapisz