alip / mpdcron

A ‘cron’ like program for mpd. It can execute scripts based on mpd’s idle events.
http://mpd.wikia.com/wiki/Client:MPDCRON
GNU General Public License v2.0
35 stars 8 forks source link

Please add --log and --verbose options #17

Open minio opened 13 years ago

minio commented 13 years ago

Sometimes mpdcron does not work (I'll elaborate in a while). Without --verbose and --log options, it's next to imposible to track what's happening or what certainly is wrong. Please add them, it would be very helpful. Or, if these are already present, please add note in -h and/or man page and/or mpdcron.conf file.

OK, speaking of my strange behavior, there is a log from console:

minio@pingwin ~ ]:-> mpdcron -k

** (mpdcron:10542): WARNING **: Failed to kill daemon: Operation not permitted
minio@pingwin ~ ]:-> mpdcron 
Daemon already running on PID 2295
minio@pingwin ~ ]:-> ps aux |grep -i 2295
minio    10640  0.0  0.0   7560   880 pts/1    S+   23:07   0:00 grep --colour=auto -i 2295
minio@pingwin ~ ]:-> su -
root@pingwin:~# mpdcron -k
** (mpdcron:10749): DEBUG: Configuration file `/root/.mpdcron/mpdcron.conf' not found, skipping

** (mpdcron:10749): WARNING \*\*: Failed to kill daemon: No such file or directory
root@pingwin:~# exit
logout
minio@pingwin ~ ]:-> mpdcron 
Daemon already running on PID 2295
minio@pingwin ~ ]:-> su -
root@pingwin:~# kill -9 2295
root@pingwin:~# mpdcron 
** (mpdcron:10861): DEBUG: Configuration file `/root/.mpdcron/mpdcron.conf' not found, skipping
Daemon returned 2 as return value
root@pingwin:~# exit
logout
minio@pingwin ~ ]:-> mpdcron 
Process 2295 died: No such process; trying to remove PID file. (/home/minio/.mpdcron/mpdcron.pid)
Daemon returned 0 as return value

I would like to track a reason of this, but mpdcron does not give me any tools :( .