Skip to content

Commit

Permalink
Update functions.sh: Add "function" to function names
Browse files Browse the repository at this point in the history
  • Loading branch information
EricClaeys authored Nov 1, 2024
1 parent ae2ff2c commit efeafb1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ else
fi

##### Start and Stop Allsky
start_Allsky()
function start_Allsky()
{
sudo systemctl start allsky 2> /dev/null
}
stop_Allsky()
function stop_Allsky()
{
sudo systemctl stop allsky 2> /dev/null
}
Expand Down Expand Up @@ -420,7 +420,7 @@ function validate_camera()
if [[ ${ON_TTY} == "true" ]]; then
echo -e "\n${RED}${MSG}${NC}\n"
else
URL="/index.php?page=configuration&_ts=${RANDOM}"
URL="/index.php?page=configuration"
"${ALLSKY_SCRIPTS}/addMessage.sh" "error" "${MSG}" "${URL}"
fi
RET=1
Expand All @@ -431,7 +431,7 @@ function validate_camera()
if [[ ${ON_TTY} == "true" ]]; then
echo -e "\n${RED}${MSG}${NC}\n"
else
URL="/index.php?page=configuration&_ts=${RANDOM}"
URL="/index.php?page=configuration"
"${ALLSKY_SCRIPTS}/addMessage.sh" "error" "${MSG}" "${URL}"
fi
RET=1
Expand All @@ -442,7 +442,7 @@ function validate_camera()
if [[ ${ON_TTY} == "true" ]]; then
echo -e "\n${RED}${MSG}${NC}\n"
else
URL="/index.php?page=configuration&_ts=${RANDOM}"
URL="/index.php?page=configuration"
"${ALLSKY_SCRIPTS}/addMessage.sh" "error" "${MSG}" "${URL}"
fi
RET=1
Expand Down Expand Up @@ -1260,7 +1260,8 @@ function indent()

# Python virtual environment
PYTHON_VENV_ACTIVATED="false"
activate_python_venv() {
function activate_python_venv()
{

# TODO: will need to change when the OS after bookworm is released
# If our next release is out, it won't support buster so may be check != bullseye ?
Expand All @@ -1274,7 +1275,8 @@ activate_python_venv() {
return 1
}

deactivate_python_venv() {
function deactivate_python_venv()
{
[[ ${PYTHON_VENV_ACTIVATED} == "true" ]] && deactivate
}

Expand Down

0 comments on commit efeafb1

Please sign in to comment.