View Single Post
shazosbourne's Avatar
Posts: 257 | Thanked: 205 times | Joined on Jan 2010 @ Sydney, Australia
#819
I have no coding experience at all but will have a stab.

Will the code below come close? AM I on the right track?
In honesty I am guessing.

PHP Code:
if [ "$QBW_EXEC_REASON== "QBW_STARTUP_UPDATE" ]; then
/usr/bin/fmtx_client -p$(if [ $(cut -d. -f1 /proc/uptime ) -lt 100 ]; then echo 0; else /usr/bin/fmtx_client | /bin/grep -'^state=enabled' ; echo $? ; fi) | /usr/bin/awk -"=" '($1=="state") {print $2}' && echo "echo 118 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level" sudo gainroot | echo ""

    
echo "OFF";
    exit 
0;
fi;

if [ 
"$QBW_CURRENT_RESULTS_TEXT== "ON" ]; then
/usr/bin/fmtx_client -p$(if [ $(cut -d. -f1 /proc/uptime ) -lt 100 ]; then echo 0; else /usr/bin/fmtx_client | /bin/grep -'^state=enabled' ; echo $? ; fi) | /usr/bin/awk -"=" '($1=="state") {print $2}'

    
echo "on";
    exit 
1;
else
/
usr/bin/fmtx_client -p$(if [ $(cut -d. -f1 /proc/uptime ) -lt 100 ]; then echo 0; else /usr/bin/fmtx_client | /bin/grep -'^state=enabled' ; echo $? ; fi) | /usr/bin/awk -"=" '($1=="state") {print $2}'

    
echo "OFF";
    exit 
0;
fi
I apologise for my lack of programming knowledge, 41 years young and learning a lot.
__________________
Everybody wants to go to heaven..............but nobody wants to go now.