BrightcoveOS/Diamond — pull request #423 by idyedov (2013-08-07 16:37:03+00:00)
Title: minor fix related to #366, was causing "Permission denied" exceptions on debian

/var/run/diamond.pid is owned by root on debian, but we pass it to diamond:
```
/usr/bin/python /usr/bin/diamond --foreground --skip-change-user --skip-fork --skip-pidfile -p /var/run/diamond.pid
```
resulting in:
```
[2013-08-07 16:20:17,108] [MainThread] Unhandled exception: [Errno 13] Permission denied: '/var/run/diamond.pid'
[2013-08-07 16:20:17,108] [MainThread] traceback: Traceback (most recent call last):
File "/usr/bin/diamond", line 324, in main
server.run()
File "/usr/lib/pymodules/python2.7/diamond/server.py", line 342, in run
self.mainloop()
File "/usr/lib/pymodules/python2.7/diamond/server.py", line 392, in mainloop
time.sleep(1)
File "/usr/bin/diamond", line 311, in sigint_handler
os.remove(options.pidfile)
OSError: [Errno 13] Permission denied: '/var/run/diamond.pid'
```
I guess diamond shouldn't try to delete it if --skip-pidfile is set, or it shouldn't be passed in the init.d script at all (or both)