I have an openwrt router (TP-Link MR3040) and on boot I have it check the slider (AP, WISP, 3G/4G mode). The goal was to have it execute the current slider status vs the old one, or do nothing if it's the same (before reboot). I just want a critique on making it more elegant.#!/bin/shtest=$(cat /root/logs/sliderstatus)status=if grep -qe sw1.*in  hi /sys/kernel/debug/gpio ; then        if grep -qe sw2.*in  hi /sys/kernel/debug/gpio ; then                # AP                logger Configure AP                status=AP        else                # WISP                logger Configure WISP                status=CLIENT        fielse        # 3G        logger Configure 3G        status=CUSTOMfiif [ $status != $test ] ; thencase $status inCLIENT) echo status is client, executing now        #sh /root/scripts/shell/CLIENT_MODE.sh &        ;;AP) echo status is AP, executing now        #sh /root/scripts/shell/AP_MODE.sh &        ;;CUSTOM) echo  status is CUSTOM, executing now        ;;*) echo ERROR status does not match ERROR        ;;esacelif [ $status == $test ] ; then        echo  Status: $status and Slider $test are the sameelse        echo You shouldn't have seen thisfi
Shell script to detect router slider status
shell;sh