Hallo,
mögen Basics sein, ich hab sie aber offenbar immer noch nicht verstanden.
Erstellt hab ich eine Verküpfung:
lrwxrwxrwx 1 fhem dialout 19 11. Mai 14:01 cupstmp -> /var/spool/cups/tmp
/var/spool/cups/tmp sieht so aus:
root@fhempi:/var/spool/cups# ls -l
insgesamt 284
...
drwxrwx--T 2 root lp 4096 11. Mai 12:34 tmp
(das mit dem T hab ich bisher noch nie gesehen)
fhem ist in der Gruppe lp:
root@fhempi:/var/spool/cups/tmp# cat /etc/group
...
lp:x:7:fhem
...
Gegeben ist ein inotify in Fhem:
defmod inot_print_queue inotify cupstmp
attr inot_print_queue mask IN_CREATE
und ein Logeintrag der auf ein Rechteproblem hinweist:
2024.05.11 14:02:09 2: inotify (inot_print_queue):Error: Permission denied for cupstmp
2024.05.11 14:02:09 3: inotify (inot_print_queue): startet watching cupstmp
Kann mir bitte wer aufzeigen wo genau mein Denkfehler liegt ?
Welche Rechte, gehören wo noch angepasst ?
Kann es daran liegen das ich eine Verknüpfung in <path> angebe ?
Geb ich mglw. <path> in inotify nicht korrekt an ?
Hintergrund des ganzen: So stell ich mir vor einen Aktor mit on-for-timer zu schalten, sobald ein Druckauftrag in dem tmp-Ordner registriert wird.
Gruß
Thomas
1. Hast DU FHEM wirklich restartet? Also auf Betriebsystemebene?
2. Du gibst uns die Rechte vom tmp-Ordner, wie sehen die der Höheren Ordnern aus?
3. Reicht wirklich "defmod inot_print_queue inotify cupstmp"? Ist das der Richtige Pfad?
Da der Symlink die Rechte 777 hat (Muß er wirklich??), sind dort die Rechte irrelevant.
Wegen 3. siehe Doku von inotify:
Define
define <name> inotify <path> [<file-RegEx>]
path: absolute path to watch
file-RegEx: file-Pattern (only watch a group of files)
Vor allem das "absolute path"
Hi,
danke für die Unterstützung.
Zitat1. Hast DU FHEM wirklich restartet? Also auf Betriebsystemebene?
Schon. Hab einen Neustart des Fhem-Rechner gemacht gehabt und nicht bemerkt (erst eben) das die inotify-Definition jetzt ihren Dienst (mit der Verknüpfung) tut ::)
Zitat2. Du gibst uns die Rechte vom tmp-Ordner, wie sehen die der Höheren Ordnern aus?
drwx--x--- 3 root lp 4096 12. Mai 07:41 cups
drwxr-xr-x 12 root root 4096 8. Nov 2023 var
drwxr-xr-x 4 root root 4096 13. Dez 08:05 spool
Zitat3. Reicht wirklich "defmod inot_print_queue inotify cupstmp"? Ist das der Richtige Pfad?
Offensichtlich.
defmod inot_print_queue inotify cupstmp
attr inot_print_queue mask IN_CREATE
attr inot_print_queue room Büro->Drucker
setstate inot_print_queue active
setstate inot_print_queue 2024-05-12 08:06:49 lastEventFile cupstmp/gs_0nWiGY
setstate inot_print_queue 2024-05-12 08:06:49 lastEventMask IN_CREATE
setstate inot_print_queue 2024-05-12 07:37:45 state active
Mit inotifywait hab ich gestern weiter gespielt und da schon bemerkt das nicht einfach nur eine Datei bei einem Druckauftrag in dem tmp-Ordner erstellt wird, sondern eine ganze Menge. Das ist natürlich in FHEM mit dem inotify-Modul nicht anders:
1715492454.43284 inotify inot_print_queue IN_CREATE: cupstmp/gs_qFYH4E
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/664058f36fef9
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.47522 inotify inot_print_queue IN_CREATE: cupstmp/664058f36fef9
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/foomatic-J02AwF
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.48506 inotify inot_print_queue IN_CREATE: cupstmp/foomatic-J02AwF
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_9xh5oI
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.7733 inotify inot_print_queue IN_CREATE: cupstmp/gs_9xh5oI
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_1byavX
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.78087 inotify inot_print_queue IN_CREATE: cupstmp/gs_1byavX
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_HJMvZQ
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.81876 inotify inot_print_queue IN_CREATE: cupstmp/gs_HJMvZQ
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_ZqMb43
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.82644 inotify inot_print_queue IN_CREATE: cupstmp/gs_ZqMb43
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_KpSsTf
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.85658 inotify inot_print_queue IN_CREATE: cupstmp/gs_KpSsTf
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_VrkHba
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.86462 inotify inot_print_queue IN_CREATE: cupstmp/gs_VrkHba
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_aYcm3Q
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.95628 inotify inot_print_queue IN_CREATE: cupstmp/gs_aYcm3Q
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_8c7KEK
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.96579 inotify inot_print_queue IN_CREATE: cupstmp/gs_8c7KEK
2024-05-12 07:51:47 inotify inot_print_queue lastEventFile: cupstmp/gs_R7VU3A
2024-05-12 07:51:47 inotify inot_print_queue lastEventMask: IN_CREATE
1715493107.99471 inotify inot_print_queue IN_CREATE: cupstmp/gs_R7VU3A
2024-05-12 07:51:48 inotify inot_print_queue lastEventFile: cupstmp/gs_hg2kAj
2024-05-12 07:51:48 inotify inot_print_queue lastEventMask: IN_CREATE
Das beschäftigt mich jetzt, wie ich das löse, das ich nur ein Event bekomme. Denke werde nicht mehr das ganze Verzeichnis überwachen, sondern nur eine Datei, wsl. die foomatic-XXXXXX . Da komme ich aber erst heute Mittag dazu.
Da es jetzt funktioniert, bitte ein [gelöst] im Titel setzen. Editiere Deinen ersten Post und dort kannst DU auch das Subjekt ändern.
Wenn Du die Gruppen eines Uers änderst, wird dieses erst beim Neueinloggen des Users durchgeführt. Entsprechend konnte der "User" FHEM nicht zugreifen, da er die Gruppe noch nicht kannte. Du hast den Pi neugestartet, weshalb das eben neu geladen wurde. Es hätte ansonsten eben auch gereicht, wenn Du den Dienst fhem neustartest, da auch damit diese Änderung durchgeführt werden.
Bin selber etwas gegen z häufigem Neustart, da dadurch auch Informationen über Fehler etc. verloren gehen können .....
Thx.
mags jetzt aber nicht mehr mit inotify, sondern mit einem incron iVm. einem Bash-Skript umsetzen.
sudo apt-get install incron
- User fhem in /etc/incron.allow hab ich eingetragen
- Als User fhem mit incrontab -e das eingetragen:
/var/spool/cups/tmp/foomatic-.* IN_CREATE /opt/fhem/www/scripts/printer.sh
- Bashskript unter /opt/fhem/www/scripts/printer.sh erstellt (das tut hab ich getestet aus FHEM):
#!/bin/bash
/usr/bin/perl /opt/fhem/fhem.pl 7072 "set MQTT2_Tradfri_Plug_3 on-for-timer 5"
err=$?
echo "$(date +"%Y.%m.%d %T") $err: fhem command"
Zitat<OrdnerOderDatei> <Ereignismaske> <Script> <Parameter>
<Parameter> ist optional hab ich gelesen (mag ja auch nix übergeben), das ist das einzige Fragezeichen das ich habe, die Pfade mein ich eigentlich korrekt angegeben zu haben.
Es tut noch nicht und ich weiß nicht wo nachschauen was schief läuft 8)
Kann da bitte wer was zu sagen ?
In FHEM klappt das jetzt natürlich auch ohne Verknüpfung:
defmod inot_print_queue inotify /var/spool/cups/tmp/ foomatic-.*
attr inot_print_queue mask IN_CREATE
attr inot_print_queue room Büro->Drucker
setstate inot_print_queue active
setstate inot_print_queue 2024-05-12 13:04:39 lastEventFile /var/spool/cups/tmp//foomatic-Z2rZ7U
setstate inot_print_queue 2024-05-12 13:04:39 lastEventMask IN_CREATE
setstate inot_print_queue 2024-05-12 12:56:44 state active
Ob es an den Leerzeichen zw. <Ereignismaske> <Script> in liegt?
/var/spool/cups/tmp/foomatic-.* IN_CREATE /opt/fhem/www/scripts/printer.sh
Wenn ich incrontab -e ausführe wird die Datei in nano geöffnet. Speichere und schliesse ich die Datei entstehen diese Leerzeichen, gemacht hab ich nur eines.
Warum ist das so ?
Reguläre Ausdrücke können wohl doch nicht im ersten Parameter verwendet werden ?
Wenn ich zum Test das ganze Verzeichnis überwache wird mein Skript ausgeführt:
fhem@fhempi:~$ incrontab -l
/var/spool/cups/tmp IN_CREATE /opt/fhem/www/scripts/printer.sh
Damit kann ich leben: (edit: klappt doch nicht zuverlässig)
fhem@fhempi:~$ incrontab -l
/var/spool/cups/tmp IN_CREATE,IN_ONESHOT /opt/fhem/www/scripts/printer.sh
In der Dokumentation (man 5 incrontab) steht:
Zitat... Please not that the * wildcard is allowed to observe a range of files.
Sollte
foomatic-* dann nicht auch
foomatic-J02AwF überwachen ?
Tut es nämlich nicht.
fhem@fhempi:~$ incrontab -l
/var/spool/cups/tmp/foomatic-* IN_CREATE /opt/fhem/www/scripts/printer.sh
Das ganze Verzeichnis überwachen klappt:
fhem@fhempi:~$ incrontab -l
/var/spool/cups/tmp IN_CREATE,recursive=false /opt/fhem/www/scripts/printer.sh
Bloß zeigt zeigt sich hier mit meinem Versuch mit
recursive=false die Unterordner auszuschliessen, das auch dies nicht greift (bekomme auch die Events der in den Unterordnern erstellten Dateien, s. #2), obwohl das in der Doku steht (zumindest versteh ich es so):
Also, there is the symbol recursive=false. This symbol limits the observation on the specified directory and does not include subdirectories.
Hätte aber gerne nur ein Event, so wie es in FHEM mit inotify iVm. regexp tut:
defmod inot_print_queue inotify /var/spool/cups/tmp/ foomatic-.*
attr inot_print_queue mask IN_CREATE
setstate inot_print_queue active
setstate inot_print_queue 2024-05-13 15:57:57 lastEventFile /var/spool/cups/tmp//foomatic-vmXPvv
setstate inot_print_queue 2024-05-13 15:57:57 lastEventMask IN_CREATE
setstate inot_print_queue 2024-05-12 14:50:55 state active
Da ich mit incrontab noch nie gearbeitet habe, kann ich Dir da nicht helfen ...
Hi,
es hat sich ergeben das ich Cups jetzt auf einer andren Pi laufen habe.
Hier hab ich jetzt folgende Lösung ausgedacht:
crontab
@reboot sleep 35 && bash /home/pi/scripts/inocups.sh
Das Bash-Skript inocups.sh in der inotifywait nie bendet wird:
#!/bin/bash
sudo inotifywait -mq -e create --format '%f' "/var/spool/cups" | while read event
err=$?
echo "$(date +"%Y.%m.%d %T") $err: inotifywait command"
do
if
[[ $event =~ 0000.* ]];
then
ssh fhem@192.168.188.26 '/usr/bin/perl /opt/fhem/fhem.pl 7072 "set MQTT2_Tradfri_Plug_3 on-for-timer 60"'
err=$?
echo "$(date +"%Y.%m.%d %T") $err: ssh command"
fi
done
Das klappt und durch den Vergleich wird bei einem Druckauftrag nur einmal der Befehl ausgeführt. Jetzt hab ich aber festgestellt das jede Nacht um 00:00 Uhr das inotifywait auch auslöst.
Laut syslog passiert da zu der Zeit das:
Jun 26 00:00:25 raspberrypiebus systemd[1]: Starting Rotate log files...
Jun 26 00:00:25 raspberrypiebus systemd[1]: Starting Daily man-db regeneration...
Jun 26 00:00:26 raspberrypiebus systemd[1]: Stopping Make remote CUPS printers available locally...
Jun 26 00:00:26 raspberrypiebus systemd[1]: cups-browsed.service: Succeeded.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Stopped Make remote CUPS printers available locally.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Stopping CUPS Scheduler...
Jun 26 00:00:26 raspberrypiebus systemd[1]: cups.service: Succeeded.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Stopped CUPS Scheduler.
Jun 26 00:00:26 raspberrypiebus systemd[1]: cups.path: Succeeded.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Stopped CUPS Scheduler.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Stopping CUPS Scheduler.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Started CUPS Scheduler.
Jun 26 00:00:26 raspberrypiebus systemd[1]: cups.socket: Succeeded.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Closed CUPS Scheduler.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Stopping CUPS Scheduler.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Listening on CUPS Scheduler.
Jun 26 00:00:26 raspberrypiebus systemd[1]: Starting CUPS Scheduler...
Jun 26 00:00:27 raspberrypiebus systemd[1]: Started CUPS Scheduler.
Jun 26 00:00:27 raspberrypiebus systemd[1]: Started Make remote CUPS printers available locally.
Jun 26 00:00:27 raspberrypiebus systemd[1]: logrotate.service: Succeeded.
Jun 26 00:00:27 raspberrypiebus systemd[1]: Finished Rotate log files.
Jun 26 00:00:29 raspberrypiebus systemd[1]: man-db.service: Succeeded.
Jun 26 00:00:29 raspberrypiebus systemd[1]: Finished Daily man-db regeneration.
Jun 26 00:00:33 raspberrypiebus kernel: [90449.909741] usb 1-1.5: new full-speed USB device number 5 using dwc_>
Jun 26 00:00:33 raspberrypiebus kernel: [90450.041000] usb 1-1.5: New USB device found, idVendor=04f9, idProduc>
Jun 26 00:00:33 raspberrypiebus kernel: [90450.041046] usb 1-1.5: New USB device strings: Mfr=1, Product=2, Ser>
Jun 26 00:00:33 raspberrypiebus kernel: [90450.041071] usb 1-1.5: Product: HL-2030 series
Jun 26 00:00:33 raspberrypiebus kernel: [90450.041093] usb 1-1.5: Manufacturer: Brother
Jun 26 00:00:33 raspberrypiebus kernel: [90450.041114] usb 1-1.5: SerialNumber: L8J405539
Jun 26 00:00:33 raspberrypiebus kernel: [90450.055146] usblp 1-1.5:1.0: usblp0: USB Bidirectional printer dev 5>
Jun 26 00:01:29 raspberrypiebus kernel: [90506.009950] usb 1-1.5: USB disconnect, device number 5
Jun 26 00:01:29 raspberrypiebus kernel: [90506.010874] usblp0: removed
...
Wenn ich mir die Dateien anschaue:
pi@raspberrypiebus:/var/spool/cups $ sudo ls -l
insgesamt 5980
-rw------- 1 root lp 1243 3. Jun 19:20 c00001
-rw------- 1 root lp 989 3. Jun 19:21 c00002
-rw------- 1 root lp 989 3. Jun 19:22 c00003
-rw------- 1 root lp 979 3. Jun 20:12 c00005
-rw------- 1 root lp 982 4. Jun 13:10 c00006
-rw------- 1 root lp 986 4. Jun 13:13 c00007
-rw------- 1 root lp 982 4. Jun 14:03 c00008
-rw------- 1 root lp 982 4. Jun 14:39 c00009
-rw------- 1 root lp 986 4. Jun 14:40 c00010
-rw------- 1 root lp 986 4. Jun 14:41 c00011
-rw------- 1 root lp 986 4. Jun 14:52 c00012
-rw------- 1 root lp 986 4. Jun 14:57 c00013
-rw------- 1 root lp 914 4. Jun 14:57 c00014
-rw------- 1 root lp 1524 4. Jun 14:58 c00015
-rw------- 1 root lp 986 4. Jun 14:59 c00016
-rw------- 1 root lp 982 4. Jun 14:59 c00017
-rw------- 1 root lp 982 4. Jun 15:00 c00018
-rw------- 1 root lp 982 4. Jun 15:01 c00019
-rw------- 1 root lp 982 4. Jun 15:05 c00020
-rw------- 1 root lp 982 4. Jun 15:05 c00021
-rw------- 1 root lp 982 4. Jun 15:06 c00022
-rw------- 1 root lp 907 4. Jun 15:06 c00023
-rw------- 1 root lp 982 4. Jun 15:06 c00024
-rw------- 1 root lp 982 4. Jun 15:17 c00025
-rw------- 1 root lp 986 4. Jun 15:19 c00026
-rw------- 1 root lp 986 4. Jun 15:20 c00027
-rw------- 1 root lp 982 4. Jun 15:43 c00028
-rw------- 1 root lp 986 4. Jun 15:47 c00029
-rw------- 1 root lp 986 4. Jun 15:53 c00030
-rw------- 1 root lp 986 4. Jun 15:54 c00031
-rw------- 1 root lp 1344 4. Jun 18:53 c00032
-rw------- 1 root lp 1389 9. Jun 13:43 c00033
-rw------- 1 root lp 1385 9. Jun 14:41 c00034
-rw------- 1 root lp 1414 9. Jun 16:40 c00035
-rw------- 1 root lp 989 9. Jun 16:46 c00036
-rw------- 1 root lp 1257 20. Jun 12:06 c00037
-rw------- 1 root lp 993 20. Jun 12:11 c00038
-rw------- 1 root lp 986 20. Jun 12:33 c00039
-rw------- 1 root lp 1259 20. Jun 12:39 c00040
-rw------- 1 root lp 1763 20. Jun 12:42 c00041
-rw------- 1 root lp 1763 20. Jun 12:43 c00042
-rw------- 1 root lp 1763 20. Jun 12:43 c00043
-rw------- 1 root lp 1763 20. Jun 12:44 c00044
-rw------- 1 root lp 984 20. Jun 13:20 c00045
-rw------- 1 root lp 965 20. Jun 13:22 c00046
-rw------- 1 root lp 995 20. Jun 13:23 c00047
-rw------- 1 root lp 995 20. Jun 13:28 c00048
-rw------- 1 root lp 1389 20. Jun 14:36 c00049
-rw------- 1 root lp 1389 20. Jun 14:36 c00050
-rw------- 1 root lp 1344 20. Jun 14:37 c00051
-rw------- 1 root lp 1389 20. Jun 15:05 c00052
-rw------- 1 root lp 995 20. Jun 15:07 c00053
-rw------- 1 root lp 1269 20. Jun 16:08 c00054
-rw------- 1 root lp 1333 20. Jun 16:12 c00055
-rw------- 1 root lp 1318 20. Jun 16:12 c00056
-rw------- 1 root lp 1302 20. Jun 16:12 c00057
-rw------- 1 root lp 1385 20. Jun 16:42 c00058
-rw------- 1 root lp 991 20. Jun 16:54 c00059
-rw------- 1 root lp 1385 20. Jun 16:57 c00060
-rw------- 1 root lp 1385 20. Jun 16:58 c00061
-rw------- 1 root lp 1453 20. Jun 16:58 c00062
-rw------- 1 root lp 991 20. Jun 17:25 c00063
-rw------- 1 root lp 991 20. Jun 17:25 c00064
-rw------- 1 root lp 1385 20. Jun 17:27 c00065
-rw------- 1 root lp 991 20. Jun 17:28 c00066
-rw------- 1 root lp 991 20. Jun 17:31 c00067
-rw------- 1 root lp 1385 20. Jun 17:39 c00068
-rw------- 1 root lp 1385 20. Jun 17:44 c00069
-rw------- 1 root lp 1389 20. Jun 17:45 c00070
-rw------- 1 root lp 1006 20. Jun 17:46 c00071
-rw------- 1 root lp 1006 20. Jun 17:47 c00072
-rw------- 1 root lp 1006 20. Jun 17:52 c00073
-rw------- 1 root lp 991 20. Jun 18:01 c00074
-rw------- 1 root lp 1389 20. Jun 18:02 c00075
-rw------- 1 root lp 1385 20. Jun 18:08 c00076
-rw------- 1 root lp 1389 20. Jun 18:08 c00077
-rw------- 1 root lp 1385 20. Jun 18:19 c00078
-rw------- 1 root lp 1449 20. Jun 18:20 c00079
-rw------- 1 root lp 1385 20. Jun 18:25 c00080
-rw------- 1 root lp 1385 20. Jun 18:35 c00081
-rw------- 1 root lp 1385 20. Jun 18:44 c00082
-rw------- 1 root lp 1389 20. Jun 18:48 c00083
-rw------- 1 root lp 1385 20. Jun 18:54 c00084
-rw------- 1 root lp 1385 20. Jun 18:59 c00085
-rw------- 1 root lp 1385 20. Jun 19:13 c00086
-rw------- 1 root lp 1389 20. Jun 22:40 c00087
-rw------- 1 root lp 1389 20. Jun 22:45 c00088
-rw------- 1 root lp 995 21. Jun 13:58 c00089
-rw------- 1 root lp 995 21. Jun 14:08 c00090
-rw------- 1 root lp 995 21. Jun 14:19 c00091
-rw------- 1 root lp 1339 21. Jun 15:48 c00092
-rw------- 1 root lp 1389 26. Jun 12:12 c00093
-rw-r----- 1 root lp 94744 20. Jun 12:04 d00037-001
-rw-r----- 1 root lp 32 20. Jun 12:10 d00038-001
-rw-r----- 1 root lp 234 20. Jun 12:33 d00039-001
-rw-r----- 1 root lp 95102 20. Jun 12:35 d00040-001
-rw-r----- 1 root lp 28095 20. Jun 12:41 d00041-001
-rw-r----- 1 root lp 23331 20. Jun 12:42 d00042-001
-rw-r----- 1 root lp 28096 20. Jun 12:43 d00043-001
-rw-r----- 1 root lp 23329 20. Jun 12:43 d00044-001
-rw-r----- 1 root lp 200631 20. Jun 13:20 d00045-001
-rw-r----- 1 root lp 42 20. Jun 13:22 d00046-001
-rw-r----- 1 root lp 140044 20. Jun 13:23 d00047-001
-rw-r----- 1 root lp 140044 20. Jun 13:28 d00048-001
-rw-r----- 1 root lp 32239 20. Jun 13:55 d00049-001
-rw-r----- 1 root lp 32245 20. Jun 14:36 d00050-001
-rw-r----- 1 root lp 795866 20. Jun 14:37 d00051-001
-rw-r----- 1 root lp 32239 20. Jun 15:05 d00052-001
-rw-r----- 1 root lp 140043 20. Jun 15:07 d00053-001
-rw-r----- 1 root lp 331695 20. Jun 16:06 d00054-001
-rw-r----- 1 root lp 364527 20. Jun 16:08 d00055-001
-rw-r----- 1 root lp 795866 20. Jun 16:12 d00056-001
-rw-r----- 1 root lp 364527 20. Jun 16:12 d00057-001
-rw-r----- 1 root lp 32236 20. Jun 16:35 d00058-001
-rw-r----- 1 root lp 140044 20. Jun 16:42 d00059-001
-rw-r----- 1 root lp 32239 20. Jun 16:56 d00060-001
-rw-r----- 1 root lp 32239 20. Jun 16:57 d00061-001
-rw-r----- 1 root lp 32243 20. Jun 16:58 d00062-001
-rw-r----- 1 root lp 140044 20. Jun 17:19 d00063-001
-rw-r----- 1 root lp 140044 20. Jun 17:21 d00064-001
-rw-r----- 1 root lp 32240 20. Jun 17:26 d00065-001
-rw-r----- 1 root lp 140044 20. Jun 17:27 d00066-001
-rw-r----- 1 root lp 140044 20. Jun 17:30 d00067-001
-rw-r----- 1 root lp 32239 20. Jun 17:38 d00068-001
-rw-r----- 1 root lp 32238 20. Jun 17:43 d00069-001
-rw-r----- 1 root lp 32239 20. Jun 17:45 d00070-001
-rw-r----- 1 root lp 139398 20. Jun 17:46 d00071-001
-rw-r----- 1 root lp 139397 20. Jun 17:47 d00072-001
-rw-r----- 1 root lp 139398 20. Jun 17:51 d00073-001
-rw-r----- 1 root lp 140043 20. Jun 17:53 d00074-001
-rw-r----- 1 root lp 32234 20. Jun 18:02 d00075-001
-rw-r----- 1 root lp 32235 20. Jun 18:06 d00076-001
-rw-r----- 1 root lp 32233 20. Jun 18:08 d00077-001
-rw-r----- 1 root lp 32239 20. Jun 18:17 d00078-001
-rw-r----- 1 root lp 32241 20. Jun 18:19 d00079-001
-rw-r----- 1 root lp 32239 20. Jun 18:24 d00080-001
-rw-r----- 1 root lp 32238 20. Jun 18:34 d00081-001
-rw-r----- 1 root lp 32235 20. Jun 18:36 d00082-001
-rw-r----- 1 root lp 32239 20. Jun 18:48 d00083-001
-rw-r----- 1 root lp 32235 20. Jun 18:50 d00084-001
-rw-r----- 1 root lp 32239 20. Jun 18:54 d00085-001
-rw-r----- 1 root lp 32239 20. Jun 19:01 d00086-001
-rw-r----- 1 root lp 32239 20. Jun 22:40 d00087-001
-rw-r----- 1 root lp 24744 21. Jun 14:47 d00092-001
-rw-r----- 1 root lp 32239 26. Jun 12:11 d00093-001
drwxrwx--T 2 root lp 4096 26. Jun 12:11 tmp
Sehe ich laut Zeitstempel keine Datei die da um 00:00 Uhr erstellt (Event create) wurde.
Upps, ausversehen auf SCHREIBEN geklickt.
Kann dazu wer was sagen was die Ursache für das auslösen um 00:00 Uhr ist oder wie man es besser lösen kann ?
Hab mich jetzt mehrere Tage nicht damit beschäftigt, ja ich sehe jetzt gerade auch das der regexp mit 4 Nullen in dem Vergleich mit $event nicht passt, dachte zu dem Zeitpunkt als ich das Skript erstellt habe es sind immer vier.
Trotzdem wird durch den Vergleich einmal ausgelöst. Aber selbst wenn immer 4 Nullen vorhanden wären, war da bei dem regexp schon zuvor ein sehr großes Fragezeichen bei mir, anders hatte ich es aber nicht hinbekommen.
edit:
Ah, es ist ein glob-Muster kein regulärer Ausdruck.
c[0-9]????
sieht gut aus, geh aber davon aus das auch damit das inotifywait um 00:00 auslösen wird.
edit2:
es wird bei einem Druckauftrag temporär eine Datei mit 8 numerischen Werten als Dateiname erstellt.
Mit [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] klappt das und das Gefühl sagt mir, wenn ich mit der Datei den Vergleich mache wird um 00:00 Uhr nicht ausgelöst.