File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed
Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -165,11 +165,12 @@ create() {
165165}
166166
167167fcdisable () {
168- fc status > /dev/null 2>&1
169- if [ $? -eq 0 ]; then
170- log " Flow Cache will be disabled ..."
171- fc disable
172- fc flush
168+ if command -v fc > /dev/null 2>&1 ; then
169+ if fc status > /dev/null 2>&1 ; then
170+ log " Flow Cache will be disabled ..."
171+ fc disable
172+ fc flush
173+ fi
173174 fi
174175}
175176
Original file line number Diff line number Diff line change 1919#! /bin/sh
2020set -e
2121echo " ...Bandwidth Usage Installation..."
22- opkg print-architecture > /dev/null 2>&1
23- if [ $? -ne 0 ]; then
22+ if opkg print-architecture > /dev/null 2>&1 ; then
23+ echo " Entware is installed"
24+ else
2425 echo " Please install entware!"
2526 echo " https://github.com/Entware/Entware"
2627 exit 1
27- else
28- echo " Entware is installed"
2928fi
3029if [ ! -x /opt/sbin/lighttpd ] || ! opkg list-installed lighttpd > /dev/null 2>&1 ; then
3130 echo " Installing lighttpd (Entware build) ..."
@@ -39,11 +38,12 @@ if ! bc -v >/dev/null 2>&1; then
3938else
4039 echo " bc is installed"
4140fi
42- fc status > /dev/null 2>&1
43- if [ $? -eq 0 ]; then
44- echo " Flow Cache will be disabled ..."
45- fc disable
46- fc flush
41+ if command -v fc > /dev/null 2>&1 ; then
42+ if fc status > /dev/null 2>&1 ; then
43+ echo " Flow Cache will be disabled ..."
44+ fc disable
45+ fc flush
46+ fi
4747fi
4848echo " Installing bwmon ..."
4949chmod +x server/bwmon.sh
You can’t perform that action at this time.
0 commit comments