wg_nmcli Ordner hinzugefügt Pfade angepasst
This commit is contained in:
parent
6fe7e7c989
commit
92ae78f5a8
@ -49,8 +49,7 @@ elif grep -i 'suse' /etc/os-release > /dev/null 2>&1
|
|||||||
|
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
echo Ihr system konnte nicht ermittelt werden.
|
echo Ihr system konnte nicht ermittelt werden.
|
||||||
@ -60,13 +59,23 @@ else
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d /home/$USER/.config/autostart ] # for GNOME, XFCE, KDE, Budgie
|
if [ ! -d /home/"$USER"/.local/share ]
|
||||||
then
|
|
||||||
cp .wgonstart.desktop /home/$USER/.config/autostart/
|
|
||||||
|
|
||||||
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
|
||||||
then
|
then
|
||||||
cp .wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/
|
mkdir -p /home/"$USER"/.local/share
|
||||||
|
cp -r wg_nmcli /home/"$USER"/.local/share/
|
||||||
|
else
|
||||||
|
cp -r wg_nmcli /home/"$USER"/.local/share/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d /home/"$USER"/.config/autostart ] # for GNOME, XFCE, KDE, Budgie
|
||||||
|
then
|
||||||
|
cp .wgonstart.desktop /home/"$USER"/.config/autostart/
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ -d /home/"$USER"/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
||||||
|
then
|
||||||
|
cp .wgonstart.desktop /home/"$USER"/.config/lxsession/Lubuntu/autostart/
|
||||||
|
|
||||||
else
|
else
|
||||||
echo Autostartdir not found!
|
echo Autostartdir not found!
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=wg_on_start
|
Name=wg_on_start
|
||||||
Name[de_DE]=.wgonstart.desktop
|
Name[de_DE]=wgonstart.desktop
|
||||||
Exec=wg_on_start
|
Exec=wg_on_start
|
||||||
NoDisplay=true
|
NoDisplay=true
|
||||||
Terminal=false
|
Terminal=false
|
@ -49,18 +49,18 @@ ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/
|
|||||||
then
|
then
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
mv /home/"$USER"/.config/autostart/.wgonstart.desktop /home/"$USER"/.config/autostart/wgonstart.desktop
|
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/"$USER"/.config/autostart/
|
||||||
else
|
else
|
||||||
mv /home/"$USER"/.config/autostart/wgonstart.desktop /home/"$USER"/.config/autostart/.wgonstart.desktop
|
rm /home/"$USER"/.config/autostart/wgonstart.desktop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
||||||
then
|
then
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
mv /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/
|
||||||
else
|
else
|
||||||
mv /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop
|
rm /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
8
wire_g
8
wire_g
@ -59,18 +59,18 @@ wg_notify(){
|
|||||||
then
|
then
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
mv /home/"$USER"/.config/autostart/.wgonstart.desktop /home/"$USER"/.config/autostart/wgonstart.desktop
|
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/"$USER"/.config/autostart/
|
||||||
else
|
else
|
||||||
mv /home/"$USER"/.config/autostart/.wgonstart.desktop /home/"$USER"/.config/autostart/.wgonstart.desktop
|
rm /home/"$USER"/.config/autostart/wgonstart.desktop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
||||||
then
|
then
|
||||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||||
then
|
then
|
||||||
mv /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/
|
||||||
else
|
else
|
||||||
mv /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/.wgonstart.desktop
|
rm /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user