Bootstrap Framework 3.3.6

Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more...

Wenn du Hilfe benötigst, stelle deine Frage hier.
Um die Entwickler etwas zu entlasten, können Nutzer anderen Nutzern auch helfen.
By Hubsi7
#8720
Hallo,
ich bin grad dabei mir ein kleine Webinterface zu basten in dem ich Musikbots verwalten kann.
um den Server zu starten brauche ich den shell_exec(); befehl. Jedoch klappt das nicht. Aufgrund eines Stackoverflow Posts habe ich jetzt Folgende Codezeilen:
Code: Select all
$cmd = "screen -d -m -L $botverzeichnis /root/mb/$botverzeichnis/start.sh -account $botacc -secretkey $secretKey -port $botport -webif-pw $adminpw -webif-pw-user $userpw -max-disk-space 100 -noquery"; 
    $redirect = '2>&1';
    // using variable substitution only for readability here 
    shell_exec("$cmd $redirect", $output);
Bei einer Ausgabe der $cmd variable ist kein Fehler festzustellen. und wenn ich diesen in die Konsole eingebe (ohne sudo) dann klappt auch alles.
Ich habe schon einmal in einem Php Forum Gefragt und die haben gemeint ich sollte mich mal hier melden.
Ich hoffe, dass hier ein paar Programmierer gibt, die mir helfen können.

~Andre
User avatar
By Crypto90
Posts Custom Custom Avatar
#10659
Der Post ist zwar schon etwas älter und unbeantowrtet.

Da ich hier gerade etwas das Forum aufräume, hier eine Lösung/Antwort zu dem Problem:


/root/mb/$botverzeichnis/start.sh <--- ist ein absoluter Pfad.
Das TS3MusicBot_runscript.sh muss direkt im Ordner wo s liegt ausgeführt werden und nicht als absoluten Pfad.

Das bedeutet:
Code: Select all
$cmd = "cd /root/mb/$botverzeichnis/; screen -d -m -L $botverzeichnis ./start.sh -account $botacc -secretkey $secretKey -port $botport -webif-pw $adminpw -webif-pw-user $userpw -max-disk-space 100 -noquery"; 
    $redirect = '2>&1';
    // using variable substitution only for readability here 
    shell_exec("$cmd $redirect", $output);
youtube

Schauen wir uns an.

Der Vollständigkeit halber antworte ich hierz[…]

If nothing from above solves your issue, I can con[…]

Web UI not responding to browser

I tried public IP, LAN IP, and letting it bind to […]

Swap-in out addons, use only what you really need!