installer angepasst

This commit is contained in:
Désiré Werner Menrath 2023-11-19 20:05:23 +01:00
parent e682215d61
commit f74c9a7245
2 changed files with 5 additions and 10 deletions

View File

@ -14,29 +14,23 @@
############################################################################################################ ############################################################################################################
# abfrage ob benötigte pakete installiert sind, wenn nicht dann installiere automatisch die benötigten Pakete. # abfrage ob benötigte pakete installiert sind, wenn nicht dann installiere automatisch die benötigten Pakete.
if [ -d /home/"$USER"/.local/bin ]
then
mkdir -p /home/"$USER"/.local/bin
fi
if grep -i 'mint\|debian\|ubuntu\|pop|' /etc/os-release > /dev/null 2>&1 if grep -i 'mint\|debian\|ubuntu\|pop|' /etc/os-release > /dev/null 2>&1
then then
echo Wire-G wird installiert... echo Wire-G wird installiert...
mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli
cp wg_on_start /home/"$USER"/.local/bin/ ; chmod +x /home/"$USER"/.local/bin/wg_on_start
if ! which yad > /dev/null ; then sudo apt install yad -y > /dev/null 2>&1 ; echo yad wird installiert. Bitte warten... ; fi if ! which yad > /dev/null ; then sudo apt install yad -y > /dev/null 2>&1 ; echo yad wird installiert. Bitte warten... ; fi
elif grep -i 'arch\|manjaro\|garuda\|endeavour|' /etc/os-release > /dev/null 2>&1 elif grep -i 'arch\|manjaro\|garuda\|endeavour|' /etc/os-release > /dev/null 2>&1
then then
echo Wire-G wird installiert... echo Wire-G wird installiert...
mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli
cp wg_on_start /home/"$USER"/.local/bin/ ; chmod +x /home/"$USER"/.local/bin/wg_on_start
if ! which yad > /dev/null ; then sudo pacman -S --noconfirm yad > /dev/null 2>&1 ; echo yad wird installiert. Bitte warten... ; fi if ! which yad > /dev/null ; then sudo pacman -S --noconfirm yad > /dev/null 2>&1 ; echo yad wird installiert. Bitte warten... ; fi
elif grep -i 'fedora' /etc/os-release > /dev/null 2>&1 elif grep -i 'fedora' /etc/os-release > /dev/null 2>&1
then then
echo Wire-G wird installiert... echo Wire-G wird installiert...
mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli
cp wg_on_start /home/"$USER"/.local/bin/; chmod +x /home/"$USER"/.local/bin/wg_on_start
if ! which yad > /dev/null ; then sudo dnf install yad > /dev/null 2>&1 ; echo yad wird installiert. Bitte warten... ; fi if ! which yad > /dev/null ; then sudo dnf install yad > /dev/null 2>&1 ; echo yad wird installiert. Bitte warten... ; fi
elif grep -i 'suse' /etc/os-release > /dev/null 2>&1 elif grep -i 'suse' /etc/os-release > /dev/null 2>&1
@ -52,7 +46,6 @@ elif grep -i 'suse' /etc/os-release > /dev/null 2>&1
then then
echo Wire-G wird installiert... echo Wire-G wird installiert...
mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli mkdir -p /home/"$USER"/.icons ; cp icons/* /home/"$USER"/.icons/ ; mkdir -p /home/"$USER"/.config/wg_nmcli
cp wg_on_start /home/"$USER"/.local/bin/ ; chmod +x /home/"$USER"/.local/bin/wg_on_start
else else
exit 1 exit 1
@ -85,6 +78,8 @@ wait;
sudo mkdir -p /usr/share/icons/Arch-Symbole ; sudo cp icons/wg-vpn.png /usr/share/icons/Arch-Symbole/ sudo mkdir -p /usr/share/icons/Arch-Symbole ; sudo cp icons/wg-vpn.png /usr/share/icons/Arch-Symbole/
wait; wait;
sudo cp wire_g /sbin/ ; sudo chmod +x /sbin/wire_g ; sudo cp wg_stop /sbin/ ; sudo chmod +x /sbin/wg_stop sudo cp wire_g /sbin/ ; sudo chmod +x /sbin/wire_g ; sudo cp wg_stop /sbin/ ; sudo chmod +x /sbin/wg_stop
wait;
sudo cp wg_on_start /sbin/ ; sudo chmod +x /sbin/wg_on_start
wait; sudo cp Wire-G.desktop /usr/share/applications/ wait; sudo cp Wire-G.desktop /usr/share/applications/
echo echo
case $LANG in case $LANG in

4
wg_on_start.desktop → wgonstart.desktop Executable file → Normal file
View File

@ -1,8 +1,8 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=wg_on_start Name=wg_on_start
Name[de_DE]=wg_on_start Name[de_DE]=wgonstart.desktop
Exec=/home/"$USER"/.local/bin/./wg_on_start Exec=wg_on_start
NoDisplay=true NoDisplay=true
Terminal=false Terminal=false
Comment=Start on Wire-G Notify with Tunnel Comment=Start on Wire-G Notify with Tunnel