| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | #!/bin/bash# Automatic install script for ArozOS - by tobychui# For internal use only, All Right Reservedecho "[ArozOS Installer]"echo "Updating apt"sudo apt upgrade -ysudo apt-get update -ysudo apt-get install ffmpeg samba git net-tools -yecho "Cloning ArozOS from source"git clone https://git.hkwtc.org/TC/arozos.gitecho "Installing Golang"arch=$(uname -m)gover="1.17.6"if [[ $arch == x86_64* ]]; then    echo "Selecting x64 Architecture"    wget https://golang.org/dl/go$gover.linux-amd64.tar.gzelif  [[ $arch == arm* ]]; then    echo "Selecting ARM Architecture"    wget https://golang.org/dl/go$gover.linux-armv6l.tar.gzelif  [[ $arch == "aarch64" ]]; then    echo "Selecting ARM64 Architecture"    wget https://golang.org/dl/go$gover.linux-arm64.tar.gzelif [[ $arch == "unknown" ]]; then    echo "Unknown CPU arch. Please enter CPU architecture manually (arm/arm64/amd64)"    read -p "Architecture: " arch    if [ "$arch" = "arm" ]; then        echo "Installing arm version of go"        wget https://golang.org/dl/go$gover.linux-armv6l.tar.gz    fi    if [ "$arch" = "arm64" ]; then	echo "Installing arm64 version of go"	wget https://golang.org/dl/go$gover.linux-arm64.tar.gz    fi    if [ "$arch" = "amd64" ]; then	echo "Installing amd64 version of go"	wget https://golang.org/dl/go$gover.linux-amd64.tar.gz    fifisudo tar -C /usr/local -xzf go*echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrcPATH=$PATH:/usr/local/go/binecho "Building ArozOS"cd arozossudo chmod 777 -R ./cd srcgo mod tidygo buildecho "Setting up system services"sudo systemctl enable systemd-networkd.service systemd-networkd-wait-online.servicecd /etc/systemd/system/printf "[Unit]\nDescription=ArozOS Cloud Service\nAfter=systemd-networkd-wait-online.service\nWants=systemd-networkd-wait-online.service\n\n[Service]\nType=simple\nExecStartPre=/bin/sleep 10\nWorkingDirectory=/home/pi/arozos/\nExecStart=/bin/bash /home/pi/arozos/start.sh\n\nRestart=always\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target" | sudo tee -a ./arozos.serviceecho "Registering systemctl service"sudo systemctl start arozos.serviceecho "Starting arozos"sudo systemctl enable arozos.servicethisip=$(hostname -I | cut -d' ' -f1)echo "Installation completed. Visit ArozOS web UI with http://$thisip:8080"
 |