Update Install.sh

This commit is contained in:
The Oddball 2022-03-30 17:47:36 -07:00 committed by GitHub
parent 249e31c4b0
commit dea41d1930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,43 +1,42 @@
GNU nano 4.8 Install.sh Modified GNU nano 4.8 Install.sh Modified
##!/bin/bash ##!/bin/bash
echo "You are about to Download/Install the required items for the HP ILO Fan control, " echo "You are about to download and install the required items for HP ILO4 fan control."
echo "Do you accept that your are about to install? [yes] or [no] :" echo "Do you accept? [yes] or [no] :"
read input read input
if [ $input = yes ] ; then if [ $input = yes ] ; then
# agreement confirmed # agreement confirmed
# refresh OR create agreement file status # refresh OR create agreement file status
echo "Installing required apt packages sshpass, lm-sensors and wget" echo "Installing required apt packages; sshpass, lm-sensors, and wget"
apt install sshpass wget lm-sensors jq -y apt install sshpass wget lm-sensors jq -y
echo "Installed required apt packages" echo "Installed required apt packages"
cd / cd /
echo "Downloading ILO_250 for ROM Upgrade" echo "Downloading ILO_250 for ROM upgrade to the / directory."
echo "Downloading to / directory"
wget https://github.com/That-Guy-Jack/HP-ILO-Fan-Control/tree/main/Files/ilo_250 wget https://github.com/That-Guy-Jack/HP-ILO-Fan-Control/tree/main/Files/ilo_250
echo "Finished Download" echo "Download finished!"
echo "Making autofan.service" echo "Making autofan.service"
cd /etc/systemd/system/ cd /etc/systemd/system/
wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan.service wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan.service
echo "Finished making autofan.service" echo "Finished making autofan.service"
echo "Which server are you running? Dl360p 1u (1) or the DL380p 2u (2) [1] or [2] :" echo "Which server are you running? DL360p G8 (1), or the DL380p G8 (2) [1] or [2] :"
read server read server
if [ $server = 1 ] ; then if [ $server = 1 ] ; then
echo "Preping autofan.sh for DL360p " echo "Preping autofan.sh for DL360p G8"
cd / cd /
echo "Downloading Latest autofan.sh" echo "Downloading latest autofan.sh"
wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan.sh wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan.sh
echo "Downloaded autofan.sh Change Placeholders with correct info" echo "Downloaded autofan.sh, please change the placeholders with correct info"
echo "Please Visit the Github Page to Follow Instructions" echo "Please cisit the GitHub page to follow the instructions!"
echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control" echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control"
exit 1 exit 1
elif [ $server = 2 ] ; then elif [ $server = 2 ] ; then
echo "Preping autofan.sh for DL380p " echo "Preping autofan.sh for DL380p G8"
cd / cd /
echo "Downloading Latest autofan.sh" echo "Downloading latest autofan.sh"
wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan-dl380p-g8.sh wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan-dl380p-g8.sh
echo "Renaming File" echo "Renaming file"
mv autofan-dl380p-g8.sh autofan.sh mv autofan-dl380p-g8.sh autofan.sh
echo "Downloaded autofan.sh Change Placeholders with correct info" echo "Downloaded autofan.sh, please change the placeholders with correct info"
echo "Please Visit the Github Page to Follow Instructions" echo "Please cisit the GitHub page to follow the instructions!"
echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control" echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control"
exit 1 exit 1
fi fi