notify for autoconnect a restart pc

This commit is contained in:
Désiré Werner Menrath 2023-11-18 16:14:00 +01:00
parent 8ef8c30690
commit 40477c2162

13
wire_g
View File

@ -52,10 +52,15 @@ wg_notify(){
# 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 AUTOSTART=$(grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt) # if AUTOSTART=$(grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt)
then # then
nmcli con mod "$ACTIVE" connection.autoconnect yes # nmcli con mod "$ACTIVE" connection.autoconnect yes
fi # if [ -d /etc/xdg/autostart ]
# then
# echo "Autostartordner in /etc/xdg/ gefunden"
# elif [ -d /usr/share/autostart ]
# then
# 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 \