diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f84c990..6c172c0 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,11 +4,11 @@
-
+
-
+
@@ -42,23 +42,23 @@
- {
- "keyToString": {
- "ASKED_ADD_EXTERNAL_FILES": "true",
- "Python.INSTALL.executor": "Run",
- "Python.install.executor": "Run",
- "Python.main.executor": "Run",
- "Python.messagebox.executor": "Run",
- "Python.start_wg.executor": "Run",
- "Python.wg_func.executor": "Run",
- "Python.wg_main.executor": "Run",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "Shell Script.install.executor": "Run",
- "git-widget-placeholder": "main",
- "last_opened_file_path": "/home/punix/Pyapps/filebrowserhiddenfiles",
- "settings.editor.selected.configurable": "preferences.fileTypes"
+
+}]]>
@@ -431,7 +431,15 @@
1726734843529
-
+
+
+ 1726764877546
+
+
+
+ 1726764877546
+
+
@@ -472,7 +480,6 @@
-
@@ -497,17 +504,7 @@
-
-
-
-
-
-
- file://$PROJECT_DIR$/wg_main.py
- 1
-
-
-
-
+
+
\ No newline at end of file
diff --git a/install b/install
index 6c34953..7132419 100755
--- a/install
+++ b/install
@@ -5,10 +5,10 @@ if [ $? -ne 0 ]
then
su -
apt install python3-tk -y && \
- cp wg_main.py start_wg.py wg_func.py wirepy /usr/bin/ && \
+ cp wg_main.py start_wg.py wg_func.py wirepy.py /usr/bin/ && \
mkdir -p /etc/wire_py && cp -R wp-icons /usr/share/icons/ && \
chown -R root:root /etc/wire_py && chmod 755 /etc/wire_py && \
- ln -sf /usr/bin/wirepy /usr/local/bin/wirepy >/dev/null && \
+ ln -sf /usr/bin/wirepy.py /usr/local/bin/wirepy >/dev/null && \
cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
cp Wire-Py.desktop /usr/share/applications/ && \
cp wg_start.services /lib/systemd/system/ && \
@@ -16,10 +16,10 @@ if [ $? -ne 0 ]
else
sudo apt install python3-tk && \
- sudo cp wg_main.py start_wg.py wg_func.py wirepy /usr/bin/ && \
+ sudo cp wg_main.py start_wg.py wg_func.py wirepy.py /usr/bin/ && \
sudo mkdir -p /etc/wire_py && sudo cp -R wp-icons /usr/share/icons/ && \
sudo chown -R root:root /etc/wire_py && sudo chmod 755 /etc/wire_py && \
- sudo ln -sf /usr/bin/wirepy /usr/local/bin/wirepy && \
+ sudo ln -sf /usr/bin/wirepy.py /usr/local/bin/wirepy && \
sudo cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
sudo cp Wire-Py.desktop /usr/share/applications/ && \
sudo cp wg_start.service /lib/systemd/system/ && \
diff --git a/wg_func.py b/wg_func.py
index 2e76d71..78aaace 100755
--- a/wg_func.py
+++ b/wg_func.py
@@ -299,7 +299,7 @@ class ExportTunnels:
tl = ListTunnels.tl_list()
try:
if len(tl) != 0:
- wg_tar = _u, now_datetime
+ wg_tar = '/home/' + str(_u) + now_datetime
p_to_conf = Path('/etc/wire_py/')
shutil.make_archive(wg_tar, 'zip', p_to_conf)
#if zip_full != 0:
diff --git a/wirepy b/wirepy
deleted file mode 100755
index b133bbe..0000000
--- a/wirepy
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-pkexec /usr/bin/wg_main.py
diff --git a/wirepy.py b/wirepy.py
new file mode 100755
index 0000000..bb3d616
--- /dev/null
+++ b/wirepy.py
@@ -0,0 +1,6 @@
+#!/bin/bash
+from subprocess import check_call
+from pathlib import Path
+
+Path.write_text(Path('/tmp/_u'), str(Path.home()))
+check_call(['pkexec', '/usr/bin/wg_main.py'])