wg_notify and wire_g about new edit to start tun.
This commit is contained in:
parent
262f242611
commit
5ed1d832c7
19
wg_on_start
19
wg_on_start
@ -44,25 +44,6 @@ ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/
|
|||||||
# autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind
|
# autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind
|
||||||
IFS=$'\n' lines=( $(cat ${WG_WDIR}tunnel.txt) )
|
IFS=$'\n' lines=( $(cat ${WG_WDIR}tunnel.txt) )
|
||||||
nmcli con mod "$lines" connection.autoconnect no
|
nmcli con mod "$lines" connection.autoconnect no
|
||||||
|
|
||||||
if [ -d /home/$USER/.config/autostart ] # for GNOME, XFCE, KDE, Budgie
|
|
||||||
then
|
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
|
||||||
then
|
|
||||||
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/"$USER"/.config/autostart/
|
|
||||||
else
|
|
||||||
rm /home/"$USER"/.config/autostart/wgonstart.desktop
|
|
||||||
fi
|
|
||||||
|
|
||||||
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
|
||||||
then
|
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
|
||||||
then
|
|
||||||
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/
|
|
||||||
else
|
|
||||||
rm /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
yad --notification \
|
yad --notification \
|
||||||
--image="${WG_PIC}wg-vpn.png" \
|
--image="${WG_PIC}wg-vpn.png" \
|
||||||
|
56
wire_g
56
wire_g
@ -55,25 +55,6 @@ wg_notify(){
|
|||||||
IFS=$'\n' lines=( $(cat ${WG_WDIR}tunnel.txt) )
|
IFS=$'\n' lines=( $(cat ${WG_WDIR}tunnel.txt) )
|
||||||
nmcli con mod "$lines" connection.autoconnect no
|
nmcli con mod "$lines" connection.autoconnect no
|
||||||
|
|
||||||
if [ -d /home/$USER/.config/autostart ] # for GNOME, XFCE, KDE, Budgie
|
|
||||||
then
|
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
|
||||||
then
|
|
||||||
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/"$USER"/.config/autostart/
|
|
||||||
else
|
|
||||||
rm /home/"$USER"/.config/autostart/wgonstart.desktop
|
|
||||||
fi
|
|
||||||
|
|
||||||
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
|
||||||
then
|
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
|
||||||
then
|
|
||||||
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/
|
|
||||||
else
|
|
||||||
rm /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
yad --notification \
|
yad --notification \
|
||||||
--image="${WG_PIC}wg-vpn.png" \
|
--image="${WG_PIC}wg-vpn.png" \
|
||||||
--icon-size=32 --no-middle \
|
--icon-size=32 --no-middle \
|
||||||
@ -193,11 +174,36 @@ up_or_down(){
|
|||||||
|
|
||||||
# funktion end
|
# funktion end
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
|
#for about of select Autostart
|
||||||
|
|
||||||
|
on_start(){
|
||||||
|
|
||||||
|
if [ -d /home/$USER/.config/autostart ] # for GNOME, XFCE, KDE, Budgie
|
||||||
|
then
|
||||||
|
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||||
|
then
|
||||||
|
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/"$USER"/.config/autostart/
|
||||||
|
else
|
||||||
|
rm /home/"$USER"/.config/autostart/wgonstart.desktop
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
||||||
|
then
|
||||||
|
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||||
|
then
|
||||||
|
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/
|
||||||
|
else
|
||||||
|
rm /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# function button "about"
|
# function button "about"
|
||||||
|
|
||||||
about(){
|
about(){
|
||||||
|
|
||||||
if grep 'TRUE TRUE' ${WG_WDIR}about.txt
|
if grep 'TRUE TRUE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
yad --form --fixed \
|
yad --form --fixed \
|
||||||
@ -214,6 +220,8 @@ about(){
|
|||||||
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
||||||
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
||||||
|
|
||||||
|
on_start
|
||||||
|
|
||||||
elif grep 'FALSE TRUE' ${WG_WDIR}about.txt
|
elif grep 'FALSE TRUE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
yad --form --fixed \
|
yad --form --fixed \
|
||||||
@ -230,6 +238,8 @@ about(){
|
|||||||
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
||||||
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
||||||
|
|
||||||
|
on_start
|
||||||
|
|
||||||
elif grep 'FALSE FALSE' ${WG_WDIR}about.txt
|
elif grep 'FALSE FALSE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
yad --form --fixed \
|
yad --form --fixed \
|
||||||
@ -246,6 +256,8 @@ about(){
|
|||||||
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
||||||
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
||||||
|
|
||||||
|
on_start
|
||||||
|
|
||||||
elif grep 'TRUE FALSE' ${WG_WDIR}about.txt
|
elif grep 'TRUE FALSE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
yad --form --fixed \
|
yad --form --fixed \
|
||||||
@ -262,6 +274,8 @@ about(){
|
|||||||
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
<span color='#626ff1'><b>Use without warranty.</b></span> \n
|
||||||
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n" &> ${WG_WDIR}about.txt
|
||||||
|
|
||||||
|
on_start
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user