Hallo zusammen
Javascript soll ein Shell script starten, über das ein GPIO-Pin angesteuert wird.
Der GPIO-Pin ist auf out gestellt und das Shell script hat Ausführungsrechte.
Wenn ich das Shell script über die Shell starte, funktioniert es. Wenn ich das Shell script
über Javascript ansteuer, wird mir im Browser(Firefox) das Shell script zum öffnen bzw.
speichern angeboten.Wird also nicht ausgeführt.
HTML
<html><head>
<script language="Javascript">
function set1()
{
document.location="/script/io10on.sh";
}
function set0()
{
document.location= "/script/io10off.sh";
}
</script></head><body>
<div style="text-align: center;">
<h1>Raspberry GPIO</h1>
<img style="width: 64px; height: 64px;" alt="back" src="../icon/back.png" id="10" onmousedown="set1()" onmouseup="set0()">
<br>
</div>
</body></html>
Alles anzeigen
Hier noch die beiden Shell scripte (io10off und io10on)