add export Tunnel as zip
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
# Wireguard functions for Wire-Py
|
||||
import os
|
||||
import shutil
|
||||
import tarfile
|
||||
from tkinter import filedialog
|
||||
import tkinter as tk
|
||||
|
||||
@ -225,8 +226,8 @@ class ExportTunnels:
|
||||
@staticmethod
|
||||
def wg_export():
|
||||
try:
|
||||
wg_exp = os.popen('nmcli con show | grep -iPo "(.*)(wireguard)"').read().split()
|
||||
wg_exp = wg_exp[1]
|
||||
return wg_exp
|
||||
except IndexError:
|
||||
wg_tar = os.environ['HOME'] + '/datetime'
|
||||
p_to_conf = os.environ['HOME'] + '/tester'
|
||||
shutil.make_archive(wg_tar, 'zip', p_to_conf)
|
||||
except TypeError:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user