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