graysky2 / anything-sync-daemon

Symlinks and syncs user specified dirs to RAM thus reducing HDD/SDD calls and speeding-up the system.
https://wiki.archlinux.org/index.php/Anything-sync-daemon
MIT License
349 stars 44 forks source link

Parameter to set an asd.pid #24

Closed ingolfured closed 9 years ago

ingolfured commented 9 years ago

Any chance we could write an asd.pid file to /run/ (or the path we provide by setting a parameter)? Would be very nice so we could monitor this daemon using monit / inspeqtor.

graysky2 commented 9 years ago

asd writes a pid file to /run/asd upon starting.

ingolfured commented 9 years ago

I'm running Ubuntu 14.04 server and have asd build 21 days ago. The output from ls -l /run | grep asd is

-rw-r--r-- 1 root       root          0 Jul 15 10:54 asd
-rw-r--r-- 1 root       root       2020 Jul 15 10:54 asd.conf

where file /run/asd tells me (obviously) that it's an empty file. So it doesn't seem to be writing a pid file to /run. Any thoughts?

graysky2 commented 9 years ago

The zero-byte-file is written by design; it is the pid file... since asd doesn't continuously run, there is not real PID that will linked to it.