Readers Digest version: My particular application for SliTaz requires the ability to remotely change the left channel volume of alsamixer's headphone output. I liked the file system meter displayed in Tazpanel so studied the script toward modifying it to fit my needs at changing the balance of the headphone output with amixer. I wrote the following script which works fine when logged in as root from the web page (using Tazpanel httpd server), but when using busybox httpd server where only the web user is logged in: amixer fails to run. Strangely enough all Busybox commands do run (df, blkid). Either the web user needs to be added to a group or amixer doesn't have execution permissions like Busybox commands do. Appreciate your help. Thank you!
I have attached what the page loads as root (via Tazpanel httpd) and as web user (Busybox httpd). Here's the script...
'cat << EOT'
'<table class="rmp">'
'EOT'
'rmp_thead'
'echo '<tbody>''
'amixer sget Headphone | grep "dB" | while read zn lfrt io id lvl db stat'
'do'
'lfrt="$(echo $lfrt | tr -d :)"'
'tot="$(echo $lvl | tr -d [])"'
'lvl="$(echo $lvl | tr -d [%])"'
'stat="$(echo $stat | tr -d [] | tr '[:lower:]' '[:upper:]')"'
'cat << EOT'
'<tr>'
'<td>$zn $lfrt</td>'
'<td>$io $stat</td>'
'<td>Alsamixer Panel</td>'
'<td class="meter"><meter min="0" max="100" value="$(echo $lvl)"'
'low="$DU_WARN" high="$DU_CRIT" optimum="10"></meter>'
'<span>$tot $db </span>'
'</td>'
'</tr>'
'EOT'
'done'
'cat << EOT'
'</tbody>'
'</table>'
'EOT'