This is very strange. If I am running a simple script that just echoes something, it's working as expected. For example:
<option value="/home/user/test.sh">Test echo</option>
/home/user/test.sh
echo this is test1
echo this is test2
echo this is test3
This shows the 3 echoes just fine.
But when I start testing a bit more complicated scripts, it doesn't show anything. For example:
#!/bin/bash
# import variables
source "${BASH_SOURCE%/*}/variables"
if [ -n "$(ls -A $localaudiomedia)" ]
then
if [[ $omxplayer_local_audio_status == *"#"* ]]
then
echo "remounting rw"
mount -o remount,rw /
echo "disabling services"
sed -i '/^#/!s/\(.*\)/#\1/g' $display
echo "enabling local audio"
sed -i '/omxplayer-local-audio/s/^#//g' $display
echo "restarting"
reboot
else
echo "local audio is already enabled";
fi
else
echo "local audio folder is empty"
fi
This echoes nothing.