Error fix

This commit is contained in:
Siddhu 2017-07-15 14:40:30 +05:30
parent 7c80a703aa
commit 8f9d4d04af

View file

@ -28,7 +28,9 @@ Options:
-k, kelvin Set Kelvin as preferred temperature unit -k, kelvin Set Kelvin as preferred temperature unit
-h, --help Show this help dialog -h, --help Show this help dialog
-i, interface Specify dnsmasq's interface listening behavior -i, interface Specify dnsmasq's interface listening behavior
Add '-h' for more info on interface usage" Add '-h' for more info on interface usage
-s, speedtest Set speedtest intevel , user 0 to disable Speedtests
"
exit 0 exit 0
} }
@ -336,7 +338,7 @@ SetCronTab()
if [[ "$1" == "0" ]]; then if [[ "$1" == "0" ]]; then
crontab crontab.tmp && rm -f crontab.tmp crontab crontab.tmp && rm -f crontab.tmp
else else
newtab="0 */"${1}" * * * sh "${speedtestfile}" > /dev/null 2>&1" newtab="0 */"${1}" * * * su root -c \""${speedtestfile}"\" > /dev/null 2>&1"
printf '%s\n' "$newtab" >>crontab.tmp printf '%s\n' "$newtab" >>crontab.tmp
crontab crontab.tmp && rm -f crontab.tmp crontab crontab.tmp && rm -f crontab.tmp
fi fi
@ -483,7 +485,7 @@ main() {
"-i" | "interface" ) SetListeningMode "$@";; "-i" | "interface" ) SetListeningMode "$@";;
"-t" | "teleporter" ) Teleporter;; "-t" | "teleporter" ) Teleporter;;
"adlist" ) CustomizeAdLists;; "adlist" ) CustomizeAdLists;;
"-s" ) ChageSpeedTestSchedule;; "-s" | "speedtest" ) ChageSpeedTestSchedule;;
* ) helpFunc;; * ) helpFunc;;
esac esac