Wire-Py/install

34 lines
1.2 KiB
Plaintext
Raw Normal View History

#!/bin/bash
2024-09-17 20:59:18 +02:00
which sudo >/dev/null
if [ $? -ne 0 ]
then
su -
apt install python3-tk -y && \
cp wg_main.py start_wg.py wg_func.py wirepy.py /usr/bin/ && \
2024-09-26 21:59:41 +02:00
mkdir -p /etc/wire_py && touch /etc/wire_py/.keys && cp -R wp-icons /usr/share/icons/ && \
chown -R root:root /etc/wire_py && chmod 755 /etc/wire_py && \
ln -sf /usr/bin/wirepy.py /usr/local/bin/wirepy >/dev/null && \
cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
cp Wire-Py.desktop /usr/share/applications/ && \
cp wg_start.services /lib/systemd/system/ && \
systemctl enable wg_start.service
else
sudo apt install python3-tk && \
sudo cp wg_main.py start_wg.py wg_func.py wirepy.py /usr/bin/ && \
2024-09-26 21:59:41 +02:00
sudo mkdir -p /etc/wire_py && sudo touch /etc/wire_py/.keys && sudo cp -R wp-icons /usr/share/icons/ && \
sudo chown -R root:root /etc/wire_py && sudo chmod 755 /etc/wire_py && \
sudo ln -sf /usr/bin/wirepy.py /usr/local/bin/wirepy && \
sudo cp org.wirepy.policy /usr/share/polkit-1/actions/ && \
sudo cp Wire-Py.desktop /usr/share/applications/ && \
sudo cp wg_start.service /lib/systemd/system/ && \
sudo systemctl enable wg_start.service
fi
read -n 1 -s -r -p $"To close the Window press a button"