testan a reboold
This commit is contained in:
+8
-8
@@ -9,29 +9,29 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# initial delay to make sure its good
|
# initial delay to make sure its good
|
||||||
echo "Sleeping 3 minutes to make sure everything is as stable as possible"
|
echo -e "\nSleeping 3 minutes to make sure everything is as stable as possible\n"
|
||||||
sleep 180
|
sleep 180
|
||||||
|
|
||||||
# rpi-update
|
# rpi-update
|
||||||
echo "Updating Raspberry Pi firmware... DO NOT REBOOT"
|
echo -e "\nUpdating Raspberry Pi firmware... DO NOT REBOOT\n"
|
||||||
sudo rpi-update
|
sudo rpi-update
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo "Sleeping 60 seconds to make sure its as stable as possible"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# run da raspberry pi config script
|
# run da raspberry pi config script
|
||||||
clear
|
clear
|
||||||
echo "Configure Raspberry Pi... DO NOT REBOOT"
|
echo -e "\nConfigure Raspberry Pi... DO NOT REBOOT\n"
|
||||||
echo -e "Enable I2C Support in raspi-config\n\tInterface Options->I2C->\n\t Would you like the ARM I2C interface to be enabled? <Yes>\n\tkernel module loaded by default <Yes>\n\nInterface Options->Serial Port\n\tWould you like a login shell to be accessible over serial? <No>\n\tWould you like the serial port hardware to be enabled? <Yes>\n"
|
echo -e "Enable I2C Support in raspi-config\n\tInterface Options->I2C->\n\t Would you like the ARM I2C interface to be enabled? <Yes>\n\tkernel module loaded by default <Yes>\n\nInterface Options->Serial Port\n\tWould you like a login shell to be accessible over serial? <No>\n\tWould you like the serial port hardware to be enabled? <Yes>\n"
|
||||||
read -p "Press ENTER to Continue"
|
read -p "Press ENTER to Continue"
|
||||||
sudo raspi-config
|
sudo raspi-config
|
||||||
|
|
||||||
# update the log
|
|
||||||
echo "Installer1.sh complete" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
|
||||||
|
|
||||||
# notify finish
|
# notify finish
|
||||||
echo "Part 1 Done!"
|
echo -e "\nPart 2/5 Done!\n"
|
||||||
|
|
||||||
|
# update the log
|
||||||
|
echo "Installer1.sh complete 2/5" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||||
|
|
||||||
# reboot after 3 minutes for safety
|
# reboot after 3 minutes for safety
|
||||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||||
|
|||||||
+6
-6
@@ -9,26 +9,26 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# initial delay to make sure its good
|
# initial delay to make sure its good
|
||||||
echo "Sleeping 3 minutes to make sure everything is as stable as possible"
|
echo -e "\nSleeping 3 minutes to make sure everything is as stable as possible\n"
|
||||||
sleep 180
|
sleep 180
|
||||||
|
|
||||||
# full distribution upgrade
|
# full distribution upgrade
|
||||||
echo "Fully upgrading, this may take a while..."
|
echo -e "\nFully upgrading, this may take a while...\n"
|
||||||
sudo apt dist-upgrade -y
|
sudo apt dist-upgrade -y
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo "Sleeping 60 seconds to make sure its as stable as possible"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
echo "Cleaning up..."
|
echo -e "\nCleaning up...\n"
|
||||||
sudo apt autoremove -y
|
sudo apt autoremove -y
|
||||||
|
|
||||||
# notify finish
|
# notify finish
|
||||||
echo "Part 2 Done!"
|
echo -e "\nPart 3/5 Done!\n"
|
||||||
|
|
||||||
# update the log
|
# update the log
|
||||||
echo "Installer2.sh complete" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
echo "Installer2.sh complete 3/5" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||||
|
|
||||||
# reboot after 3 minutes for safety
|
# reboot after 3 minutes for safety
|
||||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||||
|
|||||||
+21
-21
@@ -9,17 +9,17 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# initial delay to make sure its good
|
# initial delay to make sure its good
|
||||||
echo "Sleeping 3 minutes to make sure everything is as stable as possible"
|
echo -e "\nSleeping 3 minutes to make sure everything is as stable as possible\n"
|
||||||
sleep 180
|
sleep 180
|
||||||
|
|
||||||
# grafana repo and install
|
# grafana repo and install
|
||||||
echo "Add Grafana repo..."
|
echo -e "\nAdd Grafana repo...\n"
|
||||||
sudo mkdir -p /etc/apt/keyrings/
|
sudo mkdir -p /etc/apt/keyrings/
|
||||||
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg
|
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
|
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
|
||||||
|
|
||||||
# telegraf repo and install
|
# telegraf repo and install
|
||||||
echo "Add Telegraf repo..."
|
echo -e "\nAdd Telegraf repo...\n"
|
||||||
curl --silent --location -O \
|
curl --silent --location -O \
|
||||||
https://repos.influxdata.com/influxdata-archive.key \
|
https://repos.influxdata.com/influxdata-archive.key \
|
||||||
&& echo "943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515 influxdata-archive.key" \
|
&& echo "943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515 influxdata-archive.key" \
|
||||||
@@ -31,32 +31,32 @@ https://repos.influxdata.com/influxdata-archive.key \
|
|||||||
|
|
||||||
# remove dat key file thing
|
# remove dat key file thing
|
||||||
if [ -f /home/$username/influxdata-archive.key ]; then
|
if [ -f /home/$username/influxdata-archive.key ]; then
|
||||||
echo "Removing /home/$username/influxdata-archive.key..."
|
echo -e "\nRemoving /home/$username/influxdata-archive.key...\n"
|
||||||
rm -f /home/$username/influxdata-archive.key
|
rm -f /home/$username/influxdata-archive.key
|
||||||
else
|
else
|
||||||
echo "/home/$username/influxdata-archive.key not found, skipping delete..."
|
echo -e "\n/home/$username/influxdata-archive.key not found, skipping delete...\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# updoot
|
# updoot
|
||||||
echo "Getting new software lists..."
|
echo -e "\nGetting new software lists...\n"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo "Sleeping 60 seconds to make sure its as stable as possible"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possibl\n"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
echo "Disabling unneeded junk..."
|
echo -e "\nDisabling unneeded junk..\n"
|
||||||
sudo systemctl disable bluetooth
|
sudo systemctl disable bluetooth
|
||||||
sudo update-rc.d -f fake-hwclock remove
|
sudo update-rc.d -f fake-hwclock remove
|
||||||
# sudo systemctl disable fake-hwclock
|
# sudo systemctl disable fake-hwclock
|
||||||
|
|
||||||
# install da packages
|
# install da packages
|
||||||
echo "Installing packages, this may take a while..."
|
echo -e "\nInstalling packages, this may take a while...\n"
|
||||||
sudo apt install -y util-linux gawk telegraf grafana influxdb restic build-essential net-tools htop btop screen byobu python3 python3-pip python3-virtualenv python3-setuptools thefuck wget lynx nmap zip unzip 7zip ripgrep pps-tools gh gpsd gpsd-clients chrony syslog-ng iptraf-ng i2c-tools picocom
|
sudo apt install -y util-linux gawk telegraf grafana influxdb restic build-essential net-tools htop btop screen byobu python3 python3-pip python3-virtualenv python3-setuptools thefuck wget lynx nmap zip unzip 7zip ripgrep pps-tools gh gpsd gpsd-clients chrony syslog-ng iptraf-ng i2c-tools picocom
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo "Sleeping 60 seconds to make sure its as stable as possible"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# purging da junk
|
# purging da junk
|
||||||
@@ -70,24 +70,24 @@ gerppps=$?
|
|||||||
|
|
||||||
# add pps-gpio to modules
|
# add pps-gpio to modules
|
||||||
if [ $gerppps -eq 0 ]; then
|
if [ $gerppps -eq 0 ]; then
|
||||||
echo "pps-gpio already in /etc/modules, skipping..."
|
echo -e "\npps-gpio already in /etc/modules, skipping..n"
|
||||||
else
|
else
|
||||||
echo "Adding pps-gpio to /etc/modules..."
|
echo -e "\nAdding pps-gpio to /etc/modules...\n"
|
||||||
sudo bash -c "echo 'pps-gpio' >> /etc/modules"
|
sudo bash -c "echo 'pps-gpio' >> /etc/modules"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
echo "Cleaning up..."
|
echo -e "\nCleaning up...\n"
|
||||||
sudo apt autoremove -y
|
sudo apt autoremove -y
|
||||||
|
|
||||||
# handle users serial shit
|
# handle users serial shit
|
||||||
## self
|
## self
|
||||||
echo "Giving $username the right permissions..."
|
echo -e "\nGiving $username the right permissions...\n"
|
||||||
sudo usermod -aG dialout $username
|
sudo usermod -aG dialout $username
|
||||||
sudo usermod -a -G i2c $username
|
sudo usermod -a -G i2c $username
|
||||||
sudo usermod -a -G tty $username
|
sudo usermod -a -G tty $username
|
||||||
## service users
|
## service users
|
||||||
echo "Giving service users the right permissions..."
|
echo -e "\nGiving service users the right permissions...\n"
|
||||||
sudo usermod -aG dialout gpsd
|
sudo usermod -aG dialout gpsd
|
||||||
sudo usermod -aG dialout _chrony
|
sudo usermod -aG dialout _chrony
|
||||||
sudo usermod -aG i2c _chrony
|
sudo usermod -aG i2c _chrony
|
||||||
@@ -96,29 +96,29 @@ sudo usermod -aG tty _chrony
|
|||||||
sudo usermod -aG tty gpsd
|
sudo usermod -aG tty gpsd
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo "Sleeping 60 seconds to make sure its as stable as possible"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# installing ble.sh
|
# installing ble.sh
|
||||||
echo "Installing BLE.sh"
|
echo -e "\nInstalling BLE.sh\n"
|
||||||
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git /tmp/ble.sh
|
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git /tmp/ble.sh
|
||||||
make -C /tmp/ble.sh install PREFIX=/home/$username/.local
|
make -C /tmp/ble.sh install PREFIX=/home/$username/.local
|
||||||
echo -e "\n# ble.sh" >> /home/$username/.bashrc
|
echo -e "\n# ble.sh" >> /home/$username/.bashrc
|
||||||
echo "source -- /home/$username/.local/share/blesh/ble.sh" >> /home/$username/.bashrc
|
echo "source -- /home/$username/.local/share/blesh/ble.sh" >> /home/$username/.bashrc
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo "Sleeping 60 seconds to make sure its as stable as possible"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# general-scripts-and-system-ssssssetup
|
# general-scripts-and-system-ssssssetup
|
||||||
echo "Installing general-scripts-and-system-ssssssetup"
|
echo -e "\nInstalling general-scripts-and-system-ssssssetup\n"
|
||||||
curl -s https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/customscripts/install_script.sh?nocache=$RANDOM | sudo "$SHELL"
|
curl -s https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/customscripts/install_script.sh?nocache=$RANDOM | sudo "$SHELL"
|
||||||
|
|
||||||
# update the log
|
# update the log
|
||||||
echo "installer3.sh complete" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
echo "installer3.sh complete 4/5" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||||
|
|
||||||
# finish
|
# finish
|
||||||
echo "Part 3 Done!"
|
echo -e "\nPart 4/5 Done\n!"
|
||||||
|
|
||||||
# reboot after 3 minutes for safety
|
# reboot after 3 minutes for safety
|
||||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||||
|
|||||||
+6
-6
@@ -9,11 +9,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# initial delay to make sure its good
|
# initial delay to make sure its good
|
||||||
echo "Sleeping 3 minutes"
|
echo -e "\nSleeping 3 minutes\n"
|
||||||
sleep 180
|
sleep 180
|
||||||
|
|
||||||
# reconfigure to normal mode
|
# reconfigure to normal mode
|
||||||
echo "Starting configure script..."
|
echo -e "\nStarting configure script...\n"
|
||||||
# info level
|
# info level
|
||||||
# bash ./reconfig_full.sh ./reconfig_full.sh ./info-level-conf
|
# bash ./reconfig_full.sh ./reconfig_full.sh ./info-level-conf
|
||||||
# running (warn level)
|
# running (warn level)
|
||||||
@@ -22,11 +22,11 @@ echo "Starting configure script..."
|
|||||||
bash /home/$username/Precision-Timekeeping-Fuckery/reconfig_full.sh /home/$username/Precision-Timekeeping-Fuckery/info-level-conf-huawaii
|
bash /home/$username/Precision-Timekeeping-Fuckery/reconfig_full.sh /home/$username/Precision-Timekeeping-Fuckery/info-level-conf-huawaii
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo "Sleeping 60 seconds to make sure its as stable as possible"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# enable services
|
# enable services
|
||||||
echo "Enabling Services..."
|
echo -e "\nEnabling Services..."
|
||||||
echo -e "\tEnabling gpsd on boot"
|
echo -e "\tEnabling gpsd on boot"
|
||||||
sudo systemctl enable gpsd
|
sudo systemctl enable gpsd
|
||||||
echo -e "\tEnabling chrony on boot"
|
echo -e "\tEnabling chrony on boot"
|
||||||
@@ -57,10 +57,10 @@ sudo systemctl enable logrotate
|
|||||||
# sudo nano /lib/udev/hwclock-set
|
# sudo nano /lib/udev/hwclock-set
|
||||||
|
|
||||||
# update the log
|
# update the log
|
||||||
echo "done!" > /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
echo "installer4.sh done 5/5\nCOMPLETE AT $(date +%s)" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||||
|
|
||||||
# finish
|
# finish
|
||||||
echo "Part 4 Done!"
|
echo -e "\nPart 5/5 Done! Yaay! Done!\n"
|
||||||
|
|
||||||
# reboot after 3 minutes for safety
|
# reboot after 3 minutes for safety
|
||||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||||
|
|||||||
+9
-13
@@ -11,31 +11,27 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# initial delay to make sure its good
|
# initial delay to make sure its good
|
||||||
echo "Sleeping 3 minutes to make sure everything is as stable as possible"
|
echo -e "\nSleeping 3 minutes to make sure everything is as stable as possible\n"
|
||||||
sleep 180
|
sleep 180
|
||||||
|
|
||||||
# updoot
|
# updoot
|
||||||
echo "Updating Software Lists"
|
echo -e "\nUpdating Software Lists\n"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|
||||||
# install get for next step
|
# install get for next step
|
||||||
echo "Installing git"
|
echo -e "\nInstalling git\n"
|
||||||
sudo apt install -y git
|
sudo apt install -y git
|
||||||
|
|
||||||
# download da thing
|
# download da thing
|
||||||
echo "Cloning Repo"
|
echo "Cloning Repo"
|
||||||
cd /home/$username
|
git clone https://github.com/PrincessPi3/Precision-Timekeeping-Fuckery.git /home/$username/Precision-Timekeeping-Fuckery
|
||||||
git clone https://github.com/PrincessPi3/Precision-Timekeeping-Fuckery.git
|
|
||||||
|
|
||||||
# done
|
|
||||||
echo "Stage 1 Complete"
|
|
||||||
|
|
||||||
# update the log
|
# update the log
|
||||||
echo "installer_auto.sh complete" > /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
echo -e "START AT $(date +%s)installer_auto.sh\ncomplete 1/5" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||||
|
|
||||||
|
# done
|
||||||
|
echo -e "\nStage 1/5 Complet\n"
|
||||||
|
|
||||||
# reboot after 3 minutes for safety
|
# reboot after 3 minutes for safety
|
||||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||||
sudo shutdown -r +3
|
sudo shutdown -r +3
|
||||||
|
|
||||||
# passwordless sudo for sudo group
|
|
||||||
# %sudo ALL = (ALL) NOPASSWD: ALL
|
|
||||||
Reference in New Issue
Block a user