Tag Info

Hot answers tagged


The Linux kernel supports something called Inotify. Using it, you can tell the kernel to notify you when something happens to a file or folder. So you can do something like "Whenever a new file is placed in this folder, or whenever a file in this folder has been changed, run the following action". You can be notified when a file is created, read, written ...


You can: Communicate using D-Bus which is very popular this days. Just change a configuration file and signal your daemon to reload it (SIGUSR1, SIGUSR2 and SIGHUP have exactly this purpose). Write your own protocol with something like Thrift or Protocol Buffers. Use a low level IPC mechanism. In your place I would go with D-Bus


A daemon is basically a program with no direct user interaction... So there is nothing really specific about it. Nevertheless, you have to take care about some keys points : any output or log should go to syslog, not the standard output at startup, create a pid file under /var/run. And clear it at shutdown. you have to write a service supervision file, to ...


The error you get is because bash is looking for the end of the if block and can't find it before the end of the file, that's why the error is for line 45. Now, you have various syntax errors, first of all, an if block looks like this: if [ test something ] then do something fi The keywords then and fi are needed. Then, you should quote the ...

Only top voted, non community-wiki answers of a minimum length are eligible