Skip to content

Commit

Permalink
Merge pull request #3060 from thomasjacquin/Move-$OS-to-variables.sh
Browse files Browse the repository at this point in the history
Update variables.sh: Add PI_OS
  • Loading branch information
EricClaeys authored Oct 28, 2023
2 parents 3e06f11 + 18140d0 commit 5a44f71
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ if [[ -z "${ALLSKY_VARIABLE_SET}" ]]; then
ALLSKY_FLOWTIMINGS_DAY="${ALLSKY_FLOWTIMINGS}/day-average"
ALLSKY_FLOWTIMINGS_NIGHT="${ALLSKY_FLOWTIMINGS}/night-average"

# Verion file.
# Allsky verion.
ALLSKY_VERSION_FILE="${ALLSKY_HOME}/version"
ALLSKY_VERSION="$( head -1 "${ALLSKY_VERSION_FILE}" | tr -d '\n\r' )"

# Location of optional allsky-website package.
# Location of Allsky Website.
ALLSKY_WEBSITE="${ALLSKY_WEBUI}/allsky"
ALLSKY_WEBSITE_VIEWSETTINGS_DIRECTORY_NAME="viewSettings"
ALLSKY_WEBSITE_VIEWSETTINGS_DIRECTORY="${ALLSKY_WEBSITE}/${ALLSKY_WEBSITE_VIEWSETTINGS_DIRECTORY_NAME}"
Expand Down Expand Up @@ -155,9 +156,6 @@ if [[ -z "${ALLSKY_VARIABLE_SET}" ]]; then

# So scripts can conditionally output messages.
ALLSKY_DEBUG_LEVEL="$( jq -r '.debuglevel' "${SETTINGS_FILE}" )"

# ALLSKY_VERSION is updated during installation
ALLSKY_VERSION="XX_ALLSKY_VERSION_XX"
else
ALLSKY_DEBUG_LEVEL=1
fi
Expand All @@ -175,6 +173,9 @@ if [[ -z "${ALLSKY_VARIABLE_SET}" ]]; then
EXIT_ERROR_STOP=100 # unrecoverable error - need user action so stop service
EXIT_NO_CAMERA=101 # cannot find camera

# Name of the Pi's OS.
PI_OS="$( grep CODENAME /etc/os-release | cut -d= -f2 )"

# If a user wants to define new variables or assign variables differently,
# then load their file if it exists.
# shellcheck disable=SC1090,SC1091
Expand Down

0 comments on commit 5a44f71

Please sign in to comment.