installar and uninstaller angepasst

This commit is contained in:
2023-11-19 20:44:29 +01:00
parent f1496fac9b
commit 2541ed9d34
4 changed files with 49 additions and 17 deletions

View File

@ -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 \