starting script, init by copy/create file in (samba) folder?
hiho =)
im looking for a way to start a script as soon as a file is created(or copied) to a folder (via xp-pc on a samba folder). is there a way? note: cronjob every minute is "my way" atm, but im not happy with it as the script will run again and again, also i often have problems with still opened/not completely written files thx muab |
Samba has two options called preexec and postexec:
Code:
preexec = /path/to/script & |
many thx, its finally nearly working, at least once ;/
so when i (restart) sambad it works exactly one time. so maybe 3 ideas why: - i dont have a post exec, so the process isnt completed - there is kinda timeout that has to be reached to be able to start the script again - something else... anyone just one more idea? thx muab |
Quote:
sleep SECONDS command inside loop Code:
while : |
i allready tried thatm but the prob is that the script (in any way i treied so far) is executed just once =(
|
Did you run script as
/path/to/script & |
found out that a magic script would be exactly (well, nearly ;P) what i need..
but still trying to read howtos/faqs to get it run ;P (whats that & for at the end of the line?) |
Hi, why do you whant to run a script when a file is copyed or creater over a samba share ?
Im just curious ;-) |
All times are GMT -5. The time now is 09:43 AM. |