Commit abea741 1 parent 2ebc4a4 commit abea741 Copy full SHA for abea741
File tree 4 files changed +5
-5
lines changed
decompressed/gui_file/etc/modgui_scripts
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ checkver_cron() {
121
121
rm /etc/crontabs/root # THIS CHECK A VALID ROOT CRON... we remove it as it's useless if the owner is not root.
122
122
fi
123
123
fi
124
- if [ ! -f /etc/crontabs/root ] || [ ! " $( < /etc/crontabs/root grep checkver ) " ]; then
124
+ if [ ! -f /etc/crontabs/root ] || [ ! grep -q " checkver " /etc/crontabs/root ]; then
125
125
rand_h=$( awk -v min=1 -v max=6 ' BEGIN{srand(); print int(min+rand()*(max-min+1))}' )
126
126
rand_m=$( awk -v min=1 -v max=59 ' BEGIN{srand(); print int(min+rand()*(max-min+1))}' )
127
127
echo " $rand_m $rand_h * * * /usr/share/transformer/scripts/checkver >/dev/null 2>&1" >> /etc/crontabs/root
@@ -131,7 +131,7 @@ checkver_cron() {
131
131
}
132
132
133
133
cron_christmas () {
134
- if [ ! -f /etc/crontabs/root ] || [ " $( < /etc/crontabs/root grep -c " christmas_tree" ) " -lt 1 ]; then
134
+ if [ ! -f /etc/crontabs/root ] || [ ! grep -q " christmas_tree" /etc/crontabs/root ]; then
135
135
echo " */30 * 24-26 12 * /etc/christmas_tree.sh &" >> /etc/crontabs/root
136
136
fi
137
137
}
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ mobiled_lib_add() {
346
346
/etc/init.d/mobiled restart
347
347
else
348
348
# make sure we haven't replaced it some old GUI install, restore from rom if needed
349
- if [[ -f /rom/etc/init.d/mobiled && -n " $( cmp /rom/etc/init.d/mobiled /etc/init.d/mobiled) " ] ]; then
349
+ if [ -f /rom/etc/init.d/mobiled ] && [ -n " $( cmp /rom/etc/init.d/mobiled /etc/init.d/mobiled) " ]; then
350
350
logecho " Restoring and restarting /etc/init.d/mobiled ..."
351
351
cp /rom/etc/init.d/mobiled /etc/init.d/mobiled
352
352
/etc/init.d/mobiled restart
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ trafficmon_support() {
36
36
rm -rf /root/trafficmon
37
37
fi
38
38
39
- if [ -n " $( < /etc/crontabs/root grep trafficmon ) " ] ; then
39
+ if grep -q trafficmon /etc/crontabs/root; then
40
40
killall trafficmon 2> /dev/null
41
41
killall trafficdata 2> /dev/null
42
42
sed -i ' /trafficmon/d' /etc/crontabs/root
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ start_stop_nginx() {
29
29
done
30
30
31
31
nginx_count=0
32
- while [ " $( curl 127.0.0.1 --max-time 20 -I -s | head -n 1 | cut -d$ ' ' -f2) " != " 200" ] && [ $nginx_count -lt 5 ]; do
32
+ while [ " $( curl 127.0.0.1 --max-time 20 -I -s | head -n 1 | cut -d' ' -f2) " != " 200" ] && [ $nginx_count -lt 5 ]; do
33
33
if [ $nginx_count -gt 3 ]; then
34
34
if [ -f /var/run/nginx.pid ]; then
35
35
kill -KILL " $( cat /var/run/nginx.pid) "
You can’t perform that action at this time.
0 commit comments