34 lines
1.6 KiB
Bash
Executable File
34 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
sudo mkdir -p /usr/lib/melon-vpn/
|
|
sudo cp MelonVPNCore/bin/Release/MelonVPNCore.dll /usr/lib/melon-vpn/
|
|
sudo cp MelonVPNConnectedClientUpdate/bin/Release/MelonVPNConnectedClientUpdate.exe /usr/lib/melon-vpn/
|
|
sudo cp MelonVPNDaemon/bin/Release/MelonVPNDaemon.exe /usr/lib/melon-vpn/
|
|
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
|
|
sudo mkdir -p /etc/melon-vpn/
|
|
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
|
|
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
|
|
sudo chown root:root /etc/melon-vpn/client.cfg
|
|
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe /usr/lib/melon-vpn/
|
|
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe.config /usr/lib/melon-vpn/
|
|
sudo cp MelonVPNClient/bin/Release/melonvpnclient /usr/bin/
|
|
sudo chmod +x /usr/bin/melonvpnclient
|
|
echo "[info] Restarting daemon"
|
|
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\""
|