fix set rights in install and a .conf a import Tunnel Filedialog Part 1 /home when open
This commit is contained in:
parent
5c06db3681
commit
ad59c3ba00
@ -4,11 +4,9 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="fix rename in Messagebox warning to error">
|
<list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="set rights in install and a .conf a import Tunnel Filedialog Part 1 /home when open">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Wire-Py.desktop" beforeDir="false" afterPath="$PROJECT_DIR$/Wire-Py.desktop" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/install" beforeDir="false" afterPath="$PROJECT_DIR$/install" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/install" beforeDir="false" afterPath="$PROJECT_DIR$/install" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/org.wirepy.policy" beforeDir="false" afterPath="$PROJECT_DIR$/org.wirepy.policy" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/wg_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_func.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/wg_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_func.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/wg_main.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_main.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/wg_main.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_main.py" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
@ -417,7 +415,15 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1726652747322</updated>
|
<updated>1726652747322</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="36" />
|
<task id="LOCAL-00036" summary="set rights in install and a .conf a import Tunnel Filedialog Part 1 /home when open">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1726691611936</created>
|
||||||
|
<option name="number" value="00036" />
|
||||||
|
<option name="presentableId" value="LOCAL-00036" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1726691611936</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="37" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="UnknownFeatures">
|
<component name="UnknownFeatures">
|
||||||
@ -458,7 +464,6 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||||
<MESSAGE value="Set Style to Clam Improved layout of widgets" />
|
|
||||||
<MESSAGE value="Remove open file function, add Show Address Labels with tk.StrVar when remove a not active Tunnel Labels of Active Tunnel removed!" />
|
<MESSAGE value="Remove open file function, add Show Address Labels with tk.StrVar when remove a not active Tunnel Labels of Active Tunnel removed!" />
|
||||||
<MESSAGE value="fixed error when active tunnel is deleted, now also the Address Label is emptied" />
|
<MESSAGE value="fixed error when active tunnel is deleted, now also the Address Label is emptied" />
|
||||||
<MESSAGE value="In FrameWidged Class else Block StrVar, this resorts reference and variable assignment together" />
|
<MESSAGE value="In FrameWidged Class else Block StrVar, this resorts reference and variable assignment together" />
|
||||||
@ -483,7 +488,8 @@
|
|||||||
<MESSAGE value="install fix for set dir right" />
|
<MESSAGE value="install fix for set dir right" />
|
||||||
<MESSAGE value="fix checkbox disable and policy rename main.py to wg_main.py" />
|
<MESSAGE value="fix checkbox disable and policy rename main.py to wg_main.py" />
|
||||||
<MESSAGE value="fix rename in Messagebox warning to error" />
|
<MESSAGE value="fix rename in Messagebox warning to error" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="fix rename in Messagebox warning to error" />
|
<MESSAGE value="set rights in install and a .conf a import Tunnel Filedialog Part 1 /home when open" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="set rights in install and a .conf a import Tunnel Filedialog Part 1 /home when open" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
@ -493,11 +499,6 @@
|
|||||||
<line>1</line>
|
<line>1</line>
|
||||||
<option name="timeStamp" value="1" />
|
<option name="timeStamp" value="1" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
|
|
||||||
<url>file://$PROJECT_DIR$/wg_func.py</url>
|
|
||||||
<line>11</line>
|
|
||||||
<option name="timeStamp" value="2" />
|
|
||||||
</line-breakpoint>
|
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
</component>
|
</component>
|
||||||
|
16
install
16
install
@ -4,28 +4,22 @@ which sudo >/dev/null
|
|||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
su -
|
su -
|
||||||
apt install python3-tk -y && apt install tcl-ttkthemes -y && \
|
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 /usr/bin/ && \
|
||||||
mkdir -p /etc/wire_py && cp -R wp-icons /usr/share/icons/ && \
|
mkdir -p /etc/wire_py && cp -R wp-icons /usr/share/icons/ && \
|
||||||
chown -R root:root /etc/wire_py && sudo chmod 755 /etc/wire_py && \
|
chown -R root:root /etc/wire_py && chmod 755 /etc/wire_py && \
|
||||||
if [ ! -f /usr/local/bin/wirepy ]
|
ln -sf /usr/bin/wirepy.py /usr/local/bin/wirepy >/dev/null && \
|
||||||
then
|
|
||||||
ln -s /usr/bin/wirepy.py /usr/local/bin/wirepy >/dev/null
|
|
||||||
fi
|
|
||||||
cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
|
cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
|
||||||
cp Wire-Py.desktop /usr/share/applications/ && \
|
cp Wire-Py.desktop /usr/share/applications/ && \
|
||||||
cp wg_start.services /lib/systemd/system/ && \
|
cp wg_start.services /lib/systemd/system/ && \
|
||||||
systemctl enable wg_start.service
|
systemctl enable wg_start.service
|
||||||
|
|
||||||
else
|
else
|
||||||
sudo apt install python3-tk && sudo apt install tcl-ttkthemes && \
|
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 /usr/bin/ && \
|
||||||
sudo mkdir -p /etc/wire_py && sudo cp -R wp-icons /usr/share/icons/ && \
|
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 chown -R root:root /etc/wire_py && sudo chmod 755 /etc/wire_py && \
|
||||||
if [ ! -f /usr/local/bin/wirepy ]
|
sudo ln -sf /usr/bin/wirepy.py /usr/local/bin/wirepy && \
|
||||||
then
|
|
||||||
sudo ln -s /usr/bin/wirepy.py /usr/local/bin/wirepy
|
|
||||||
fi
|
|
||||||
sudo cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
|
sudo cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
|
||||||
sudo cp Wire-Py.desktop /usr/share/applications/ && \
|
sudo cp Wire-Py.desktop /usr/share/applications/ && \
|
||||||
sudo cp wg_start.service /lib/systemd/system/ && \
|
sudo cp wg_start.service /lib/systemd/system/ && \
|
||||||
|
@ -184,7 +184,7 @@ class ImportTunnel:
|
|||||||
filepath = filedialog.askopenfilename(initialdir=Path('/home/'), title='Select Wireguard config '
|
filepath = filedialog.askopenfilename(initialdir=Path('/home/'), title='Select Wireguard config '
|
||||||
'File',
|
'File',
|
||||||
filetypes=[('WG config files', '*.conf')], )
|
filetypes=[('WG config files', '*.conf')], )
|
||||||
os.chmod(filepath, 0o600)
|
|
||||||
with open(filepath, 'r') as file:
|
with open(filepath, 'r') as file:
|
||||||
read = file.read()
|
read = file.read()
|
||||||
path_split = filepath.split('/')
|
path_split = filepath.split('/')
|
||||||
@ -224,7 +224,7 @@ class ImportTunnel:
|
|||||||
ShowAddress.init_and_report(self, data)
|
ShowAddress.init_and_report(self, data)
|
||||||
ShowAddress.show_data(self)
|
ShowAddress.show_data(self)
|
||||||
check_call(['nmcli', 'con', 'mod', self.a, 'connection.autoconnect', 'no'])
|
check_call(['nmcli', 'con', 'mod', self.a, 'connection.autoconnect', 'no'])
|
||||||
|
os.chmod(str(wg_read), 0o600)
|
||||||
if 'PrivateKey = ' not in read:
|
if 'PrivateKey = ' not in read:
|
||||||
msg_window()
|
msg_window()
|
||||||
except EOFError:
|
except EOFError:
|
||||||
|
Loading…
Reference in New Issue
Block a user