2020-09-22 23:10:16 +01:00
|
|
|
#!/bin/bash
|
2020-09-23 20:22:00 +01:00
|
|
|
# new lib folder
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo mkdir -p /usr/lib/melon-vpn/
|
2020-09-23 20:22:00 +01:00
|
|
|
|
|
|
|
# copying
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo cp MelonVPNCore/bin/Release/MelonVPNCore.dll /usr/lib/melon-vpn/
|
2020-09-23 20:22:00 +01:00
|
|
|
sudo cp MelonVPNCore/bin/Release/Newtonsoft.Json.dll /usr/lib/melon-vpn/
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo cp MelonVPNConnectedClientUpdate/bin/Release/MelonVPNConnectedClientUpdate.exe /usr/lib/melon-vpn/
|
|
|
|
sudo cp MelonVPNDaemon/bin/Release/MelonVPNDaemon.exe /usr/lib/melon-vpn/
|
2020-09-23 20:22:00 +01:00
|
|
|
|
|
|
|
# check if daemon service exists
|
2020-09-22 23:10:16 +01:00
|
|
|
if [ -f /etc/systemd/system/melonvpndaemon.service ]; then
|
|
|
|
echo "[info] Found daemon service at \"/etc/systemd/system/melonvpndaemon.service\" delete this to reinstall the default service"
|
|
|
|
else
|
|
|
|
sudo cp MelonVPNDaemon/bin/Release/melonvpndaemon.service /etc/systemd/system/
|
|
|
|
fi
|
2020-09-23 20:22:00 +01:00
|
|
|
|
|
|
|
# make client config folder
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo mkdir -p /etc/melon-vpn/
|
2020-09-23 20:22:00 +01:00
|
|
|
|
|
|
|
# check if client config exists
|
2020-09-22 23:10:16 +01:00
|
|
|
if [ -f /etc/melon-vpn/client.cfg ]; then
|
|
|
|
echo "[info] Found config at \"/etc/melon-vpn/client.cfg\" delete this to reinstall the default config"
|
|
|
|
else
|
|
|
|
sudo cp MelonVPNDaemon/bin/Release/client.cfg /etc/melon-vpn/
|
|
|
|
fi
|
2020-09-23 20:22:00 +01:00
|
|
|
|
|
|
|
# check if desktop file exists
|
2020-09-22 23:10:16 +01:00
|
|
|
if [ -f /usr/share/applications/melonvpn.desktop ]; then
|
|
|
|
echo "[info] Found desktop file at \"/usr/share/applications/melonvpn.desktop\" delete this to reinstall the default one"
|
|
|
|
else
|
|
|
|
sudo cp MelonVPNClient/bin/Release/melonvpn.desktop /usr/share/applications/
|
|
|
|
fi
|
2020-09-23 20:22:00 +01:00
|
|
|
|
|
|
|
# change client config to be owned by root
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo chown root:root /etc/melon-vpn/client.cfg
|
2020-09-23 20:22:00 +01:00
|
|
|
|
|
|
|
# copy more files
|
2021-03-19 20:26:24 +00:00
|
|
|
sudo cp MelonVPNClient/bin/Release/appindicator3-sharp.dll /usr/lib/melon-vpn/
|
2020-10-05 13:06:11 +01:00
|
|
|
sudo cp MelonVPNClient/bin/Release/libnotify.net.dll /usr/lib/melon-vpn/
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe /usr/lib/melon-vpn/
|
|
|
|
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe.config /usr/lib/melon-vpn/
|
2020-09-23 20:22:00 +01:00
|
|
|
sudo cp MelonVPNClient/bin/Release/MiniMelonVPNIcon.png /usr/lib/melon-vpn/
|
|
|
|
sudo cp MelonVPNClient/bin/Release/MiniMelonVPNOnline.png /usr/lib/melon-vpn/
|
|
|
|
|
2020-10-06 10:54:25 +01:00
|
|
|
# copy app indicator icons
|
|
|
|
mkdir -p ~/.local/share/icons/hicolor/128x128/apps/
|
|
|
|
cp MelonVPNClient/bin/Release/MiniMelonVPNIcon.png ~/.local/share/icons/hicolor/128x128/apps/
|
|
|
|
cp MelonVPNClient/bin/Release/MiniMelonVPNOnline.png ~/.local/share/icons/hicolor/128x128/apps/
|
|
|
|
|
2020-09-23 20:22:00 +01:00
|
|
|
# make all exe files in melon vpn projects executable
|
|
|
|
sudo chmod +x /usr/lib/melon-vpn/*.exe
|
|
|
|
|
|
|
|
# so its on path now?
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo cp MelonVPNClient/bin/Release/melonvpnclient /usr/bin/
|
|
|
|
sudo chmod +x /usr/bin/melonvpnclient
|
2020-09-23 20:22:00 +01:00
|
|
|
|
2020-09-22 23:10:16 +01:00
|
|
|
echo "[info] Restarting daemon"
|
2020-09-23 20:22:00 +01:00
|
|
|
# cuz science
|
2020-09-22 23:10:16 +01:00
|
|
|
sudo systemctl stop melonvpndaemon
|
|
|
|
sudo systemctl disable melonvpndaemon
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo systemctl enable melonvpndaemon
|
|
|
|
sudo systemctl start melonvpndaemon
|
|
|
|
echo "[info] Remember to setup \"/etc/melon-vpn/client.cfg\""
|