Skip to content

Commit

Permalink
Update install.sh: check for raspistill on Bullseye
Browse files Browse the repository at this point in the history
Fixes #2900
  • Loading branch information
EricClaeys authored Aug 2, 2023
1 parent e862b49 commit d88eb15
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,20 @@ select_camera_type()
}


####
# If the raspistill command exists on post-Buster releases,
# rename it so it's not used.
check_for_raspistill()
{
STATUS_VARIABLES+=("check_for_raspistill='true'\n")

if W="$( which raspistill )" && [[ ${OS} != "buster" ]]; then
echo display_msg --longonly info "Renaming 'raspistill' on ${OS}."
echo sudo mv "${W}" "${W}-OLD"
fi
}


####
# Create the file that defines the WebUI variables.
create_webui_defines()
Expand Down Expand Up @@ -1818,7 +1832,7 @@ restore_prior_settings_file()

MSG="Your old WebUI settings were transfered to the new release,"
MSG="${MSG}\n but note that there have been some changes to the settings file"
MSG="${MSG} (e.g., some settings in config.sh are now in the settings file)."
MSG="${MSG} (e.g., settings in ftp-settings.sh are now in the settings file)."
MSG="${MSG}\n\nPlease check your settings in the WebUI's 'Allsky Settings' page."
whiptail --title "${TITLE}" --msgbox "${MSG}" 18 "${WT_WIDTH}" 3>&1 1>&2 2>&3
display_msg info "\n${MSG}\n"
Expand All @@ -1843,8 +1857,8 @@ restore_prior_settings_file()

MSG="You need to manually transfer your old settings to the WebUI.\n"
MSG="${MSG}\nNote that there have been many changes to the settings file"
MSG="${MSG} since you last installed Allsky, so it will likely be easiest"
MSG="${MSG} to re-enter everything via the WebUI's 'Allsky Settings' page."
MSG="${MSG} since you last installed Allsky, so please use the "
MSG="${MSG} the WebUI's 'Allsky Settings' page."
whiptail --title "${TITLE}" --msgbox "${MSG}" 18 "${WT_WIDTH}" 3>&1 1>&2 2>&3
display_msg info "\n${MSG}\n"
echo -e "\n\n==========\n${MSG}" >> "${POST_INSTALLATION_ACTIONS}"
Expand Down Expand Up @@ -2798,6 +2812,9 @@ display_image "InstallationInProgress"
##### Prompt for the camera type
[[ ${select_camera_type} != "true" ]] && select_camera_type

##### If raspistill exists on post-Buster OS, rename it.
[[ ${check_for_raspistill} != "true" ]] && check_for_raspistill

##### Get the new host name
[[ ${prompt_for_hostname} != "true" ]] && prompt_for_hostname

Expand Down

0 comments on commit d88eb15

Please sign in to comment.