diff --git a/installer1.0.5 b/installer1.0.5 index d29eff4..20f691f 100755 --- a/installer1.0.5 +++ b/installer1.0.5 @@ -62,14 +62,12 @@ fi if [ -d /home/$USER/.config/autostart ] # for GNOME, XFCE, KDE, Budgie then - cp wg_on_start.desktop /home/$USER/.config/autostart/ - chmod +x /home/$USER/.config/autostart/wg_on_start.desktop + cp wgonstart.desktop /home/$USER/.config/autostart/ elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE then - cp wg_on_start.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/ - chmod +x /home/$USER/.config/lxsession/Lubuntu/autostart/wg_on_start.desktop - + cp wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/ + else echo Autostartdir not found! fi diff --git a/uninstaller1.0.0 b/uninstaller1.0.0 index 8ef17a9..a220177 100755 --- a/uninstaller1.0.0 +++ b/uninstaller1.0.0 @@ -13,7 +13,17 @@ cd || exit rm -f /home/"$USER"/.icons/wg-active.png wg-stop.png wg-vpn.png wg-import.png wg-trash.png wg-info.png wg-vpn-info.png wait; -rm -r /home/"$USER"/.config/wg_nmcli ; rm /home/$USER/.config/autostart/wg_on_start.desktop ; rm /sbin/wg_on_start +rm -r /home/"$USER"/.config/wg_nmcli ; rm /sbin/wg_on_start +if [ -d /home/$USER/.config/autostart ] # for GNOME, XFCE, KDE, Budgie + then + rm /home/$USER/.config/autostart/wgonstart.desktop > /dev/null 2>&1 + rm /home/$USER/.config/autostart/.wgonstart.desktop > /dev/null 2>&1 + +elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE + then + rm /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop > /dev/null 2>&1 + rm /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop > /dev/null 2>&1 +fi wait; sudo rm /usr/share/icons/Arch-Symbole/wg-vpn.png ; sudo rm /sbin/wire_g ; sudo rm /sbin/wg_stop wait; diff --git a/wg_on_start b/wg_on_start index 18376fc..e853786 100644 --- a/wg_on_start +++ b/wg_on_start @@ -44,12 +44,24 @@ ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ # autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind IFS=$'\n' lines=( $(cat ${WG_WDIR}tunnel.txt) ) 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 + mv /home/"$USER"/.config/autostart/.wgonstart.desktop mv /home/"$USER"/.config/autostart/wgonstart.desktop + else + mv /home/"$USER"/.config/autostart/.wgonstart.desktop mv /home/"$USER"/.config/autostart/.wgonstart.desktop + fi - if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt - then - chmod +x /home/"$USER"/.local/bin/wg_on_start - else - chmod -x /home/"$USER"/.local/bin/wg_on_start + elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE + then + if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt + then + mv /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop + else + mv /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop + fi fi yad --notification \ diff --git a/wire_g b/wire_g index 5ff0d33..65216c7 100755 --- a/wire_g +++ b/wire_g @@ -19,7 +19,7 @@ export TEXTDOMAINDIR="/usr/share/locale" ############################################################################################################ ############################################################################################################ -VERSION=3.1.5 +VERSION=3.1.7 # wg_workdir Arbeitsverzeichnis wg WG_WDIR="/home/$USER/.config/wg_nmcli/" # Pfad wg Icons @@ -55,11 +55,23 @@ wg_notify(){ IFS=$'\n' lines=( $(cat ${WG_WDIR}tunnel.txt) ) nmcli con mod "$lines" connection.autoconnect no - if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt - then - chmod +x /home/"$USER"/.local/bin/wg_on_start - else - chmod -x /home/"$USER"/.local/bin/wg_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 + mv /home/"$USER"/.config/autostart/.wgonstart.desktop mv /home/"$USER"/.config/autostart/wgonstart.desktop + else + mv /home/"$USER"/.config/autostart/.wgonstart.desktop mv /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 + mv /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop + else + mv /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop + fi fi yad --notification \