Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash -x
- # Ngrok authentication token (replace 'YOUR_NGROK_AUTH_TOKEN' with your actual token)
- NGROK_AUTH_TOKEN="YOUR_NGROK_AUTH_TOKEN"
- # Set timezone to Europe/Berlin
- sudo timedatectl set-timezone Europe/Berlin
- # 1. System update and upgrade
- sudo apt-get update
- sudo apt-get upgrade -y
- # Install Mono
- sudo apt-get install mono-complete -y
- # Install required packages
- sudo apt-get install -y build-essential libcurl4-openssl-dev libssl-dev libcurl4-gnutls-dev libmariadb-dev-compat librtmp-dev libmariadb-dev libmariadb-dev-compat tk-dev libncurses5-dev libncursesw5-dev libreadline-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libssl-dev libffi-dev python3-dev python3-pip
- # Install tmux
- sudo apt-get install -y tmux
- # Install jq
- sudo apt-get install -y jq
- # Install lm-sensors
- sudo apt-get install -y lm-sensors
- sudo sensors-detect --auto
- # Download, compile, and install Python 3.6.5
- wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
- tar xf Python-3.6.5.tar.xz
- cd Python-3.6.5
- ./configure
- make -j4
- sudo make altinstall
- sudo pip3.6 install --upgrade pip
- # Clean up downloaded files
- cd ..
- sudo rm -r Python-3.6.5
- rm Python-3.6.5.tar.xz
- # Install necessary dependencies for dash and pycurl
- sudo apt-get install -y libssl-dev libffi-dev python3-dev python3-pip
- # Install wheel package
- sudo pip3.6 install wheel
- # Install dash and pycurl
- pip3.6 install dash pycurl
- # Download and install MFbot from the specified URL
- wget https://download.mfbot.de/latest/MFBot_Konsole_ARM64
- chmod +x MFBot_Konsole_ARM64
- # Create the mfbot-webinterface directory if it doesn't exist
- mkdir -p mfbot-webinterface
- # Enter the web interface directory
- cd mfbot-webinterface || { echo "Error: Unable to change to mfbot-webinterface directory."; exit 1; }
- # Add Ngrok authentication token
- wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm64.tgz
- tar -xzf ngrok-stable-linux-arm64.tgz
- rm ngrok-stable-linux-arm64.tgz
- ./ngrok authtoken "$NGROK_AUTH_TOKEN"
- # Check if mf_Curator.sh is already in place
- if [ -f mf_Curator.sh ]; then
- echo "mf_Curator.sh is already in place."
- else
- # Wait for mf_Curator.sh to be placed
- while [ ! -f mf_Curator.sh ]; do
- echo "Please place mf_Curator.sh inside the mfbot-webinterface directory. Press Enter when done."
- read -r
- done
- fi
- # Make mf_Curator.sh executable
- chmod +x mf_Curator.sh
- # Download and extract the MF Bot web interface to its folder
- wget https://download.mfbot.de/v5.0.0.4/mfbot-webinterface.zip
- unzip mfbot-webinterface.zip
- rm mfbot-webinterface.zip
- # Remove existing requirements.txt
- rm requirements.txt
- # Create a new requirements.txt file
- echo -e "pandas>=0.23.0\nplotly>=2.7.0\ndash==0.21.1\ndash-core-components==0.23.0\ndash-html-components==0.11.0\ndash-table-experiments==0.6.0\ndash-renderer==0.13.0\npycurl==7.43.0.2\nnumpy>=1.14.4\ndash-auth==1.0.2\nflask==1.0.2\ncolorama==0.3.9\nwheel" > requirements.txt
- # Check if pip3.6 is available
- if command -v pip3.6 >/dev/null 2>&1; then
- pip3.6 install -r requirements.txt
- else
- # Install zlib1g-dev
- sudo apt-get update
- sudo apt-get install -y zlib1g-dev
- # Install pip manually for Python 3.6
- wget https://bootstrap.pypa.io/pip/3.6/get-pip.py
- sudo python3.6 get-pip.py
- rm get-pip.py
- # Install dependencies using pip3.6 for Python 3.6
- pip3.6 install -r requirements.txt
- fi
- # Download Ngrok from the specified URL and extract it in the web interface directory
- wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz
- tar -xzf ngrok-v3-stable-linux-arm64.tgz
- rm ngrok-v3-stable-linux-arm64.tgz
- # Make mf_Curator.sh executable or exit if not found
- if [ -f mf_Curator.sh ]; then
- chmod +x mf_Curator.sh
- else
- echo "Error: mf_Curator.sh not found. Please make sure it exists."
- exit 1
- fi
- # Start the mf_Curator.sh script
- ./mf_Curator.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement