Is there a way to add a file to the library from command line? I see there is an -add option, but that spawns an instance of mediatomb; I already have one running.
Is there a better way than something like: mediatomb -add /path/to/file &; PID=$?; sleep 15 && kill $PID
I 've done some things directly with the sqlite dabase (var/lib/mediatomb/mediatomb.db), with the sqlite3 util, but you have to know SQL, and mediatomb have to be stopped before editing the database…
all in all, I thing that just for adding file, the -add flag is waaaaay better, although don't underant why just wait 15 seconds and then kill.
aaaah I see :) seems that is put itself as a "foreground daemon" …
I cannot figure out why would you want to kill the process whose pid is the return code of calling `meditomb -add somefile'. That command always returns zero. Luckily, Linux uses process zero only during kernel initialization (). Had it been a valid process number, it could have had potentially devastating effects if run as root
Ok, now I get it. You meant to extract the process PID with $$. Still, it doesn't work on my server, whilst
mediatomb -P pid.txt -add /home/giulix/pippo.txt & sleep 15 && kill `cat pid.txt` && rm -f pid.txt
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.