As we know flash memory limited to read so it is about few month max if it reads every 5 secunds
I have a script which has endless loop in it and every 5 secunds child script executed and exit 0
/bin/myservice.sh
###################setup part####################################
echo "setting parametrs"
var1=7
var2=8
######################loop part##########################
while :
do
sleep 5
/bin/ash /bin/mykika.sh $var1 $var2
done
####################################################
and /bin/mykika.sh
var1=$1
var2=$2
echo "$var1 and $var2"
exit 0
I am afraid that /bin/mykika.sh will be readed from flash every 5 seconds cause it has exit 0
Where is the best directories i put my scripts so they will be read only once and flash wont be used anymore ?
Or how to exucute a script in RAM and be sure about it ?
i am sure about scripts in loop i cheked it but! waht about child running scripts with exit 0 wich means this copy will be destroyed and the end and then again child script will be runing wich will be read from flash .
I know about /tmp/ and about to do so, but maybe I don't have to, also would like to know maybe there is special directories which runs from RAM in OpenWrt
i use this way for years
all my dynamic scripts,configs and data for SNMP/LLDP/q-bridge-mib/fdb, etc... are placed in /tmp and i am very happy with this