Create install test
parent
e0af76ff3c
commit
a2e6313ea5
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
|
||||
|
||||
function error {
|
||||
echo -e "\\e[91m$1\\e[39m"
|
||||
exit 1
|
||||
}
|
||||
clear='\033[0m'
|
||||
green='\033[1;32m'
|
||||
cyan='\033[1;36m'
|
||||
yellow='\033[0;33m'
|
||||
grey='\033[0;37m'
|
||||
|
||||
echo -e "${green} __ __ _ __ "
|
||||
echo -e " / / ____ / /__(_)___ ___ / /_"
|
||||
echo -e " / / / __ \/ //_/ / __ \/ _ \/ __/ "
|
||||
echo -e " / /___/ /_/ / ,< / / / / / __/ /_"
|
||||
echo -e " /_____/\____/_/|_/_/_/ /_/\___/\__/ "
|
||||
echo -e "${yellow}Pi-Apps Installer by Minotaurware.net${grey}_______________ "
|
||||
echo -e "|___|___|___|___|___|___|___|___|___|___|___|___|___| "
|
||||
echo -e "|_|___|___|___|___|___|___|___|___|___|___|___|___|_| "
|
||||
echo -e "${clear}"
|
||||
|
||||
echo "Installing public key and adding packages..."
|
||||
sudo modprobe tun || error "Failed to load the 'tun' kernel module!"
|
||||
sudo wget -qO /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg || error "Failed to download /etc/apt/trusted.gpg.d/oxen.gpg"
|
||||
echo "deb https://deb.oxen.io $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/oxen.list
|
||||
|
||||
echo "Installing Lokinet-GUI and resolvconf..."
|
||||
"${DIRECTORY}/pkg-install" "lokinet-gui resolvconf" "$(dirname "$0")" || exit 1
|
||||
|
||||
if [ ! -e /etc/systemd/system/lokinet.service.d/override.conf ]; then
|
||||
echo "Applying systemd tun override..."
|
||||
sudo mkdir /etc/systemd/system/lokinet.service.d
|
||||
echo '[Service]' | sudo tee -a /etc/systemd/system/lokinet.service.d/override.conf >/dev/null
|
||||
echo 'ExecStartPre=+modprobe tun' | sudo tee -a /etc/systemd/system/lokinet.service.d/override.conf >/dev/null
|
||||
sudo systemctl daemon-reload
|
||||
fi
|
||||
|
||||
echo "Installing resolvconf and configure..."
|
||||
sudo resolvconf -u
|
||||
sudo systemctl restart lokinet || error "Systemd failed to restart the lokinet service!"
|
||||
|
||||
echo "Installation complete!"
|
Loading…
Reference in New Issue