Skip to content

Commit

Permalink
set service with or without arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Jan 25, 2024
1 parent 5d02fb7 commit 94533e7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions advanced/Scripts/webpage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,14 @@ ClearSpeedtestData() {
}

ChangeSpeedTestSchedule() {
if [[ "${args[2]}" =~ ^[0-9]+$ ]]; then
if [ "${args[2]}" -ge 0 -a "${args[2]}" -le 24 ]; then
addOrEditKeyValPair "${setupVars}" "SPEEDTESTSCHEDULE" "${args[2]}"
SetService ${args[2]}
if [[ "${args[2]}" =~ ^[0-9]+$ ]] && [ "${args[2]}" -ge 0 -a "${args[2]}" -le 24 ]; then
addOrEditKeyValPair "${setupVars}" "SPEEDTESTSCHEDULE" "${args[2]}"
SetService ${args[2]}
else
if [[ -z "${SPEEDTESTSCHEDULE}" ]]; then
addOrEditKeyValPair "${setupVars}" "SPEEDTESTSCHEDULE" "0"
fi
SetService ${SPEEDTESTSCHEDULE}
fi
}

Expand Down

0 comments on commit 94533e7

Please sign in to comment.