testan a reboold
This commit is contained in:
+69
-50
@@ -243,61 +243,80 @@ phase_four () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
phase_five () {
|
phase_five () {
|
||||||
# initial delay to make sure its good
|
# initial delay to make sure its good
|
||||||
echo -e "\nSleeping $long_delay minutes\n"
|
echo -e "\nSleeping $long_delay minutes\n"
|
||||||
sleep $long_delay_seconds
|
sleep $long_delay_seconds
|
||||||
|
|
||||||
# reconfigure to normal mode
|
# reconfigure to normal mode
|
||||||
echo -e "\nStarting configure script...\n"
|
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)
|
||||||
# bash ./reconfig_full.sh ./running-warn-level-conf
|
# bash ./reconfig_full.sh ./running-warn-level-conf
|
||||||
# debug/dev mode
|
# debug/dev mode
|
||||||
bash $git_dir/reconfig_full.sh "$git_dir/info-level-conf-huawaii"
|
bash $git_dir/reconfig_full.sh "$git_dir/info-level-conf-huawaii"
|
||||||
|
|
||||||
# safety delay
|
# safety delay
|
||||||
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
echo -e "\nSleeping 60 seconds to make sure its as stable as possible\n"
|
||||||
sleep $short_delay_seconds
|
sleep $short_delay_seconds
|
||||||
|
|
||||||
# enable services
|
# enable services
|
||||||
echo -e "\nEnabling 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"
|
||||||
sudo systemctl enable chrony
|
sudo systemctl enable chrony
|
||||||
echo -e "\tEnabling influxdb on boot"
|
echo -e "\tEnabling influxdb on boot"
|
||||||
sudo systemctl enable influxdb
|
sudo systemctl enable influxdb
|
||||||
echo -e "\tEnabling telegraf on boot"
|
echo -e "\tEnabling telegraf on boot"
|
||||||
sudo systemctl enable telegraf
|
sudo systemctl enable telegraf
|
||||||
echo -e "\tEnabling grafana on boot"
|
echo -e "\tEnabling grafana on boot"
|
||||||
sudo systemctl enable grafana-server
|
sudo systemctl enable grafana-server
|
||||||
echo -e "\tEnabling syslog-ng on boot"
|
echo -e "\tEnabling syslog-ng on boot"
|
||||||
sudo systemctl enable syslog-ng
|
sudo systemctl enable syslog-ng
|
||||||
echo -e "\tEnabling logrotate on boot"
|
echo -e "\tEnabling logrotate on boot"
|
||||||
sudo systemctl enable logrotate
|
sudo systemctl enable logrotate
|
||||||
|
|
||||||
# unclear if this is needed
|
# unclear if this is needed
|
||||||
# edit dis
|
# edit dis
|
||||||
## comment out and add note
|
## comment out and add note
|
||||||
## # commented out manually to use rtc
|
## # commented out manually to use rtc
|
||||||
## # if [ -e /run/systemd/system ] ; then
|
## # if [ -e /run/systemd/system ] ; then
|
||||||
## # exit 0
|
## # exit 0
|
||||||
## # fi
|
## # fi
|
||||||
## Also comment out the two lines
|
## Also comment out the two lines
|
||||||
## # /sbin/hwclock --rtc=$dev --systz --badyear
|
## # /sbin/hwclock --rtc=$dev --systz --badyear
|
||||||
## and
|
## and
|
||||||
## # /sbin/hwclock --rtc=$dev --systz
|
## # /sbin/hwclock --rtc=$dev --systz
|
||||||
# echo "Editing hwclock-set file"
|
# echo "Editing hwclock-set file"
|
||||||
# sudo nano /lib/udev/hwclock-set
|
# sudo nano /lib/udev/hwclock-set
|
||||||
|
|
||||||
# update the log
|
# update the running file
|
||||||
echo "installer4.sh done 5/5\nCOMPLETE AT $(date +%s)" >> $status_log
|
echo 5 > $installer_status
|
||||||
|
|
||||||
# finish
|
# update the log
|
||||||
echo -e "\nPart 5/5 Done! Yaay! Done!\n"
|
echo "installer4.sh done 5/5\nCOMPLETE AT $(date +%s)" >> $status_log
|
||||||
|
|
||||||
# reboot after 3 minutes for safety
|
# delete tmp file
|
||||||
echo -e "\nREBOOTING IN $long_delay MINUTES\n"
|
rm -f $status_log
|
||||||
sudo shutdown -r +$long_delay
|
|
||||||
|
# finish
|
||||||
|
echo -e "\nPart 5/5 Done! Yaay! Done!\n"
|
||||||
|
|
||||||
|
# reboot after 3 minutes for safety
|
||||||
|
echo -e "\nREBOOTING IN $long_delay MINUTES\n"
|
||||||
|
sudo shutdown -r +$long_delay
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ -f $status_log ]; then
|
||||||
|
if [[ $(cat $installer_status) =~ "*1*" ]]; then
|
||||||
|
phase_two
|
||||||
|
elif [[ $(cat $installer_status) =~ "*2*" ]]; then
|
||||||
|
phase_three
|
||||||
|
elif [[ $(cat $installer_status) =~ "*3*" ]]; then
|
||||||
|
phase_four
|
||||||
|
elif [[ $(cat $installer_status) =~ "*4*" ]]; then
|
||||||
|
phase_five
|
||||||
|
else
|
||||||
|
phase_one
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user