| 1 |
joko |
1.1 |
(x) GiantDisc via Erweitertem Web-Frontend |
| 2 |
|
|
|
| 3 |
|
|
sudo -u music /home/music/bin/gdkeypad.pl {$player['ipaddr']} {$player['id']} 0 {$_GET['command']} > /dev/null |
| 4 |
|
|
sudo -u music /home/music/bin/gdkeypad.pl 127.0.0.1 1 0 play |
| 5 |
|
|
|
| 6 |
|
|
(x) gdkeypad.pl existiert nicht! (zu finden im Forum unter http://giantdisc.org/forum/viewtopic.php?t=78&highlight=gdkeypad) |
| 7 |
|
|
-> via janosch |
| 8 |
|
|
|
| 9 |
|
|
|
| 10 |
|
|
(x) Rechteproblem 1: Rechte im MySQL - Ich musste den Benutzer "music" mit hostnamen "siggi.site" im MySQL anlegen |
| 11 |
|
|
Kann man ganz einfach testen: |
| 12 |
|
|
|
| 13 |
|
|
# mysql -u music -h localhost |
| 14 |
|
|
mysql> show databases; |
| 15 |
|
|
+-----------+ |
| 16 |
|
|
| Database |
| 17 |
|
|
+-----------+ |
| 18 |
|
|
| GiantDisc |
| 19 |
|
|
| test |
| 20 |
|
|
+-----------+ |
| 21 |
|
|
|
| 22 |
|
|
# mysql -u music -h siggi |
| 23 |
|
|
mysql> show databases; |
| 24 |
|
|
+-----------+ |
| 25 |
|
|
| Database |
| 26 |
|
|
+-----------+ |
| 27 |
|
|
| test |
| 28 |
|
|
+-----------+ |
| 29 |
|
|
|
| 30 |
|
|
|
| 31 |
|
|
(x) Rechteproblem 2: Bei obigem "sudo"-Aufruf kommt dann "sh: gdplayd.pl: command not found" |
| 32 |
|
|
|
| 33 |
|
|
-> Problem: Anscheinend wird bei "sudo" der Pfad nicht richtig per ".bashrc" gesetzt - ganz einfach testen mittels: |
| 34 |
|
|
#> sudo -u music echo $PATH |
| 35 |
|
|
|
| 36 |
|
|
-> Lösung / Testen: |
| 37 |
|
|
sudo -u music -H sh -c ". ~/.bashrc; echo \$PATH" |
| 38 |
|
|
|
| 39 |
|
|
-> Lösung für webint/index.php Z. 130 ff. |
| 40 |
|
|
$command = "sudo -u music -H sh -c \". ~/.bashrc; /home/music/bin/gdkeypad.pl {$player['ipaddr']} {$player['id']} 0 {$_GET['command']} > /dev/null\""; |
| 41 |
|
|
if (!readConfig("common_isdemo")) exec($command); |
| 42 |
|
|
|
| 43 |
|
|
|
| 44 |
|
|
(x) Rechteproblem 3: Apache (wwwrun) muss noch in die sudoers: |
| 45 |
|
|
|
| 46 |
|
|
# visudo |
| 47 |
|
|
wwwrun ALL = (ALL) NOPASSWD: /bin/sh |
| 48 |
|
|
|
| 49 |
|
|
Testen mittels: (dazu müsste man dem Benutzer "wwwrun" *temporär* /bin/bash als Login-Shell angeben) |
| 50 |
|
|
# su wwwrun |
| 51 |
|
|
# cd /tmp |
| 52 |
|
|
# sudo -u music -H sh -c ". ~/.bashrc; /home/music/bin/gdkeypad.pl siggi 1 0 play" |
| 53 |
|
|
|
| 54 |
|
|
|
| 55 |
|
|
(o) Playlist-Repeat-Funktion |
| 56 |
|
|
(o) Aktivierung der momentan zu spielenden Playlist |
| 57 |
|
|
(o) Auf externe (normale) Repositories zugreifen können |