Skip to content

Commit

Permalink
Merge pull request #3225 from thomasjacquin/Misc-installation-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-developer authored Dec 23, 2023
2 parents 0ba9900 + 4c833f6 commit 8278a64
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 81 deletions.
15 changes: 8 additions & 7 deletions html/documentation/basics/Pi.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ <h3>Operating Systems</h3>
such as Allsky.
The two most common versions of Linux for the Pi are <b>Buster</b>,
which was released several years ago,
and <b>Bullseye</b> which was released late 2021.
Allsky runs on both operating systems but use <b>Bullseye</b> if possible,
and <b>Bullseye</b> which was released late 2021. <b>Bookworm</b> was released with the launch of the Pi 5.
Allsky runs on all three operating systems but use <b>Bookworm</b> 64bit if possible,
especially if you have an RPi camera.
Allsky works on both the 32-bit and 64-bit versions of Bullseye;
Allsky works on both the 32-bit and 64-bit versions of Bullseye and Bookworm;
there was no official 64-bit version of Buster and Allsky is not supported on it.
</p>
<p>
Expand All @@ -59,29 +59,30 @@ <h3>Operating Systems</h3>
<h3>Raspberry Pi Models</h3>
<details><summary></summary>
<p>
There are several models of the Pi including Zero, Zero 2, 1, 2, 3, 4, and others.
There are several models of the Pi including Zero, Zero 2, 1, 2, 3, 4, 5, and others.
The Pi 3 and 4 are the most common being used for Allsky,
but some people have the Pi Zero or Zero 2 because of their low cost.
The various models have different processing power;
the Pi 4 is the most powerful, followed by the 3, then 2, then 1, then Zero.
the Pi 5 is the most powerful, followed by the 4, then 3, then 2, then 1.
The Zero 2 is near the Pi 3 in terms of processing power but has less memory.
The Pi 4 is available with up to 8 GB memory whereas the
Pi Zero and Zero 2 are limited to 0.5 GB memory.
The Pi 5 is the latest version and is supported as of v2023.05.01_04 release.
Although Allsky can run on the Zero 2, several GB of swap space are needed,
and even then, Allsky just barely runs.
The processing power of the Pi Zero is very limited so you likely won't
be able to create timelapse videos - stay away from it if possible.
</p>
<p>
<strong>The ideal unit is a Pi 4 with 4 GB memory.</strong>
<strong>The recommended unit is a Pi 4 or 5 with 4 GB or more of memory.</strong>
Allsky runs nicely on that and the USB 3.0 ports are nice for cameras that support it.
</p>
</details>

<h3>Hardware Overview</h3>
<details><summary></summary>
<p>
Newer devices come with USB 2 ports and the Pi 4 has a couple USB 3 ports.
Newer devices come with USB 2 ports and the Pi 4 and 5 both have two USB 3 ports.
They also have a special port to plug RPi and compatible cameras into.
</p>
</details>
Expand Down
23 changes: 13 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
# shellcheck disable=SC2154 # referenced but not assigned

[[ -z ${ALLSKY_HOME} ]] && export ALLSKY_HOME="$(realpath "$(dirname "${BASH_ARGV0}")")"
ME="$(basename "${BASH_ARGV0}")"
[[ -z ${ALLSKY_HOME} ]] && export ALLSKY_HOME="$( realpath "$( dirname "${BASH_ARGV0}" )" )"
ME="$( basename "${BASH_ARGV0}" )"

#shellcheck source-path=.
source "${ALLSKY_HOME}/variables.sh" || exit "${EXIT_ERROR_STOP}"
Expand Down Expand Up @@ -1362,12 +1362,12 @@ is_reboot_needed()
local OLD_VERSION="${1}"
local OLD_BASE_VERSION="${OLD_VERSION:0:11}" # Without point release
local NEW_VERSION="${2}"
if [[ ${NEW_VERSION:0:11} == "v2023.05.01" && ${OLD_BASE_VERSION} == "v2023.05.01" ]]; then
# just bug fixes between the v2023.05.01 versions.
if [[ ${OLD_VERSION} < "v2023.05.01_04" ]]; then
# v2023.05.01_04 added to $PATH and a reboot's needed to have it take effect.
display_msg --log progress "A reboot is needed after installation finishes."
else
REBOOT_NEEDED="false"
display_msg --logonly info "No reboot is needed."
else
display_msg --log progress "A reboot is needed after installation finishes."
fi
}

Expand All @@ -1388,7 +1388,8 @@ does_prior_Allsky_exist()
PRIOR_ALLSKY_VERSION="$( get_version "${PRIOR_ALLSKY_DIR}/" )"
if [[ -n ${PRIOR_ALLSKY_VERSION} ]]; then
display_msg --logonly info "Prior Allsky version ${PRIOR_ALLSKY_VERSION} found."
if [[ ${PRIOR_ALLSKY_VERSION} == "v2022.03.01" ]]; then # First Allsky version with a "version" file
if [[ ${PRIOR_ALLSKY_VERSION} == "v2022.03.01" ]]; then
# First Allsky version with a "version" file.
# This is an old style Allsky with ${CAMERA} in config.sh.
# Don't do anything here; go to the "if" below.
:
Expand Down Expand Up @@ -1516,7 +1517,7 @@ update_config_sh()
CAMERA_TYPE="$( settings .cameraType )"
fi
sed -i \
-e "s;^ALLSKY_VERSION=.*$;ALLSKY_VERSION=\"${ALLSKY_VERSION}\";" \
-e "s;XX_ALLSKY_VERSION_XX;${ALLSKY_VERSION};" \
-e "s;^CAMERA_TYPE=.*$;CAMERA_TYPE=\"${CAMERA_TYPE}\";" \
"${C}"

Expand All @@ -1530,6 +1531,8 @@ create_allsky_logs()
{
display_msg --log progress "Setting permissions on ${ALLSKY_LOG} and ${ALLSKY_PERIODIC_LOG}."

sudo systemctl stop rsyslog 2> /dev/null

TMP="${ALLSKY_INSTALLATION_LOGS}/rsyslog.log"
sudo apt-get --assume-yes install rsyslog > "${TMP}" 2>&1
check_success $? "rsyslog installation failed" "${TMP}" "${DEBUG}"
Expand All @@ -1539,7 +1542,7 @@ create_allsky_logs()
sudo chmod 664 "${ALLSKY_LOG}" "${ALLSKY_PERIODIC_LOG}"
sudo chgrp "${ALLSKY_GROUP}" "${ALLSKY_LOG}" "${ALLSKY_PERIODIC_LOG}"

sudo systemctl restart rsyslog # so logs go to the files above
sudo systemctl start rsyslog # so logs go to the files above
}


Expand Down Expand Up @@ -2563,7 +2566,7 @@ check_new_exposure_algorithm()
remind_run_check_allsky()
{
MSG="After you've configured Allsky, run:"
MSG="${MSG}\n&nbsp; &nbsp; &nbsp; cd ~/allsky; scripts/check_allsky.sh"
MSG="${MSG}\n&nbsp; &nbsp; &nbsp; check_allsky.sh"
MSG="${MSG}\nto check for any issues. You can also run it whenever you make changes."
"${ALLSKY_SCRIPTS}/addMessage.sh" "info" "${MSG}"
display_msg --logonly info "Added message about running 'check_allsky.sh'."
Expand Down
4 changes: 2 additions & 2 deletions scripts/addMessage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ TAB="$(echo -e "\t")"
# Convert newlines to HTML breaks.
MESSAGE="$( echo -en "${MESSAGE}" |
awk 'BEGIN { l=0; } { if (++l > 1) printf("<br>"); printf("%s", $0); }' )"
MESSAGE="${MESSAGE// /&nbsp;&nbsp;}"
MESSAGE="${MESSAGE// /\&nbsp;\&nbsp;}"

# Messages may have "/" in them so we can't use that to search in sed,
# so use "%" instead, but because it could be in a message (although unlikely),
# convert all "%" to the ASCII code.
# The pound sign in escaped only to make gvim look nicer.
MESSAGE="${MESSAGE//%/&\#37;}"
MESSAGE="${MESSAGE//%/\&\#37;}"

# If ${MESSAGE} contains "*" it hoses up the grep and sed regular expression, so escape it.
ESCAPED_MESSAGE="${MESSAGE//\*/\\*}"
Expand Down
62 changes: 0 additions & 62 deletions test.sh

This file was deleted.

0 comments on commit 8278a64

Please sign in to comment.