Depending on the mode, it needs to start a different process I assume. So there needs to be a switch or if condition. Which seems missing.
For my specific needs, I check lorawan or station mode and set process to lora_pkt_fwd or station.
....
if [[ "$chip" = "sx1276_2" ]]; then
process="lg02_pkt_fwd"
elif [[ "$chip" = "sx1276_1" ]]; then
process="lg01_pkt_fwd"
elif [[ "$chip" = "sx1301" ]] || [[ "$chip" = "sx1308" ]] ; then
# added by me
if [[ "$mode" = "lorawan" ]]; then process="lora_pkt_fwd"; elif [[ "$mode" = "station" ]]; then process="station"; fi
ln -sf /usr/bin/station_sx1301 /usr/bin/station
cp -f /etc/station/station-sx1301.conf /etc/station/station.conf
/usr/bin/generate-config.sh
....
Also, in iot script, added a "reset_lgw.sh start" before the station command:
/usr/bin/reset_lgw.sh start ; cd /etc/station ; station -L /var/iot/station.log -d