Hi,
I am using kubuntu 8.0. In the init script "start-stop-daemon --stop --quiet -p $PID_FILE" used to stop a daemon. It is also specified at the top that PID_FILE="/var/run/daemon.pid".

I can start daemon, but when i try to stop, it is not stopping. Also no .pid file is generated in the location /var/run.

Can anybody please tell how does the daemon.pid file generate inside /var/run or it automatically generate the .pid file when daemon starts? Else anything we need to write for generate the pid file? If so where we going to wtite it? Is it in the init script? Please reply anyone have any idea about this.

Thanks in advance,
Renjith

Usually the application creates the .pid (Process ID) file when it starts, and the location varies with the application. Sometimes you can tell the app where to put the .pid via the app's config file, but the general default is /var/run/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.