testan a reboold
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# m h dom mon dow command
|
||||
# set hardware I2C RTC hourly
|
||||
0 * * * * /bin/bash -c "/usr/sbin/hwclock -w 2>> /var/log/root-crontab.log"
|
||||
# webhook to notify of reboot
|
||||
@reboot /usr/share/customscripts/ifnet "/usr/share/customscripts/webhook bootup" 2>> /var/log/root-crontab.log
|
||||
|
||||
+10
-5
@@ -1,15 +1,20 @@
|
||||
#!/bin/bash
|
||||
# set -e
|
||||
|
||||
# get real user
|
||||
if [ ! -z $SUDO_USER ]; then
|
||||
username=$SUDO_USER
|
||||
else
|
||||
username=$USER
|
||||
fi
|
||||
|
||||
# initial delay to make sure its good
|
||||
echo "Sleeping 3 minutes"
|
||||
sleep 180
|
||||
|
||||
# rpi-update
|
||||
# echo "Updating Raspberry Pi firmware..."
|
||||
# sudo rpi-update
|
||||
echo "Updating Raspberry Pi firmware..."
|
||||
sudo rpi-update
|
||||
|
||||
# run da raspberry pi config script
|
||||
clear
|
||||
@@ -18,10 +23,10 @@ echo -e "Enable I2C Support in raspi-config\n\tInterface Options->I2C->\n\t Woul
|
||||
read -p "Press ENTER to Continue"
|
||||
sudo raspi-config
|
||||
|
||||
# notify finish
|
||||
echo "Installer1.sh complete" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||
|
||||
echo "Part 1 Done!"
|
||||
# echo "Rebooting now!"
|
||||
# sudo reboot
|
||||
|
||||
# reboot after 3 minutes for safety
|
||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||
sudo shutdown -r +3
|
||||
+12
-3
@@ -1,22 +1,31 @@
|
||||
#!/bin/bash
|
||||
# set -e
|
||||
|
||||
# get real user
|
||||
if [ ! -z $SUDO_USER ]; then
|
||||
username=$SUDO_USER
|
||||
else
|
||||
username=$USER
|
||||
fi
|
||||
|
||||
# initial delay to make sure its good
|
||||
echo "Sleeping 3 minutes"
|
||||
sleep 180
|
||||
|
||||
# full distribution upgrade
|
||||
echo "Fully upgrading, this may take a while..."
|
||||
sudo apt dist-upgrade -y
|
||||
|
||||
# cleanup
|
||||
echo "Cleaning up..."
|
||||
sudo apt autoremove -y
|
||||
|
||||
# notify finish
|
||||
echo "Part 2 Done!"
|
||||
|
||||
# update the log
|
||||
echo "Installer2.sh complete" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||
|
||||
echo "Part 2 Done!"
|
||||
# echo "Rebooting now!"
|
||||
# sudo reboot
|
||||
# reboot after 3 minutes for safety
|
||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||
sudo shutdown -r +3
|
||||
+10
-6
@@ -1,12 +1,17 @@
|
||||
#!/bin/bash
|
||||
# set -e
|
||||
|
||||
# get real user
|
||||
if [ ! -z $SUDO_USER ]; then
|
||||
username=$SUDO_USER
|
||||
else
|
||||
username=$USER
|
||||
fi
|
||||
|
||||
# initial delay to make sure its good
|
||||
echo "Sleeping 3 minutes"
|
||||
sleep 180
|
||||
|
||||
# grafana repo and install
|
||||
echo "Add Grafana repo..."
|
||||
sudo mkdir -p /etc/apt/keyrings/
|
||||
@@ -50,9 +55,6 @@ sudo apt install -y gawk ripgrep telegraf grafana influxdb restic build-essentia
|
||||
echo "Purging unneeded junk..."
|
||||
sudo apt purge -y "bluetooth*" "usb*" "wireless*" "pci*" "fonts*" "bluez*" "alsa*" fake-hwclock build-essential
|
||||
|
||||
# echo "Setting hostname to grandfatherclock"
|
||||
# sudo hostnamectl set-hostname grandfatherclock
|
||||
|
||||
# check if pps-gpio is in /etc/modules already
|
||||
grep -e "pps-gpio" /etc/modules
|
||||
gerppps=$?
|
||||
@@ -65,6 +67,7 @@ else
|
||||
sudo bash -c "echo 'pps-gpio' >> /etc/modules"
|
||||
fi
|
||||
|
||||
# cleanup
|
||||
echo "Cleaning up..."
|
||||
sudo apt autoremove -y
|
||||
|
||||
@@ -73,6 +76,7 @@ sudo apt autoremove -y
|
||||
echo "Giving $username the right permissions..."
|
||||
sudo usermod -aG dialout $username
|
||||
sudo usermod -a -G i2c $username
|
||||
sudo usermod -a -G tty $username
|
||||
## service users
|
||||
echo "Giving service users the right permissions..."
|
||||
sudo usermod -aG dialout gpsd
|
||||
@@ -96,11 +100,11 @@ echo "Installing general-scripts-and-system-ssssssetup"
|
||||
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
|
||||
cd /home/$username/Precision-Timekeeping-Fuckery
|
||||
echo "installer3.sh complete" >> /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||
|
||||
# finish
|
||||
echo "Part 3 Done!"
|
||||
# echo "Rebooting now!"
|
||||
# sudo reboot
|
||||
|
||||
# reboot after 3 minutes for safety
|
||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||
sudo shutdown -r +3
|
||||
+9
-3
@@ -1,12 +1,17 @@
|
||||
#!/bin/bash
|
||||
# set -e
|
||||
|
||||
# get real user
|
||||
if [ ! -z $SUDO_USER ]; then
|
||||
username=$SUDO_USER
|
||||
else
|
||||
username=$USER
|
||||
fi
|
||||
|
||||
# initial delay to make sure its good
|
||||
echo "Sleeping 3 minutes"
|
||||
sleep 180
|
||||
|
||||
# reconfigure to normal mode
|
||||
echo "Starting configure script..."
|
||||
# info level
|
||||
@@ -33,11 +38,12 @@ sudo systemctl enable syslog-ng
|
||||
echo -e "\tEnabling logrotate on boot"
|
||||
sudo systemctl enable logrotate
|
||||
|
||||
# update the log
|
||||
echo "done!" > /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||
|
||||
# reboot rq
|
||||
# finish
|
||||
echo "Part 4 Done!"
|
||||
# echo "Rebooting now!"
|
||||
# sudo reboot
|
||||
|
||||
# reboot after 3 minutes for safety
|
||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||
sudo shutdown -r +3
|
||||
+13
-1
@@ -3,28 +3,40 @@
|
||||
## curl -s https://raw.githubusercontent.com/PrincessPi3/Precision-Timekeeping-Fuckery/refs/heads/main/installer_auto.sh?nocache=$RANDOM | sudo $SHELL
|
||||
# set -e
|
||||
|
||||
# get real username (not root) if run with sudo
|
||||
if [ ! -z $SUDO_USER ]; then
|
||||
username=$SUDO_USER
|
||||
else
|
||||
username=$USER
|
||||
fi
|
||||
|
||||
# initial delay to make sure its good
|
||||
echo "Sleeping 3 minutes"
|
||||
sleep 180
|
||||
|
||||
# passwordless sudo
|
||||
echo -e "Edit sudoers file\n\t%sudo ALL = (ALL) NOPASSWD: ALL"
|
||||
sudo visudo
|
||||
|
||||
# updoot
|
||||
echo "Updating Software Lists"
|
||||
sudo apt update
|
||||
|
||||
# install get for next step
|
||||
echo "Installing git"
|
||||
sudo apt install -y git
|
||||
|
||||
# download da thing
|
||||
echo "Cloning Repo"
|
||||
cd /home/$username
|
||||
git clone https://github.com/PrincessPi3/Precision-Timekeeping-Fuckery.git
|
||||
cd /home/$username/Precision-Timekeeping-Fuckery
|
||||
|
||||
# done
|
||||
echo "Stage 1 Complete"
|
||||
|
||||
# update the log
|
||||
echo "installer_auto.sh complete" > /home/$username/Precision-Timekeeping-Fuckery/status.txt
|
||||
|
||||
# reboot after 3 minutes for safety
|
||||
echo -e "\nREBOOTING IN 3 MINUTES\n"
|
||||
sudo shutdown -r +3
|
||||
Reference in New Issue
Block a user