On linux an unix-like systems is demon the designation of processes running in the background and providing certain services. Direct user intaractions with demons are not intended.
Questions tagged [daemon]
286 questions
12
votes
1 answer
Monit configuration reload - supposed to restart monitored services?
Running Monit 5.4 on an Ubuntu server. When I use monit reload, it seems that it restarts monitored services (Tomcat 7 in this situation). Is it the expected behavior? Documentation says :
reload - Reinitialize a running Monit daemon, the daemon…

smonff
- 346
- 2
- 5
- 15
12
votes
4 answers
Is there a difference between a daemon and a service?
Is there a difference between a daemon and a service?
Or are they both basically an application that is resident in memory, and is bound to a specific port and listens/responds to requests?

Blankman
- 2,891
- 10
- 39
- 68
12
votes
3 answers
Can start-stop-daemon use environmental variables?
I need to daemonize a Windows app running in Wine, and create a pid in /var/run. Since it requires an X11 session to run, I need to make sure the $DISPLAY variable is set in the running user's environment.
Assuming I already have a X11 session…

scottburton11
- 123
- 1
- 1
- 5
11
votes
1 answer
Systemd : Run a Python Script At Startup (virtualenv)
I have a python script that I normally run it with this command:
(environment) python run.py
I want to run this script at start. (I'm using ubuntu) Here is my service:
[Unit]
Description=My Script…

Jasmine
- 243
- 1
- 3
- 9
10
votes
3 answers
Managing daemons with supervisor: no foreground mode available
I'm trying to manage a process with supervisord, but the process does not have an option to run in foreground: it always daemonizes. (That's Zabbix Server).
Is there any way to manage daemons with supervisor? Any tools which will make it run in…

kolypto
- 11,058
- 12
- 54
- 66
10
votes
5 answers
runit - unable to open supervise/ok: file does not exist
I'm trying to figure out why runit will not boot or give me the status for the managed applications. Running on Ubuntu 12.04.
I created /service, /etc/sv/myapp (with a run script, a config file, a log folder and a run script inside of it). I create…

Alexandr Kurilin
- 566
- 1
- 8
- 22
10
votes
2 answers
Run as different user
On a RedHat system, i'm trying to launch a program with a different user who dont have any shell. In /etc/passwd, shell is /sbin/nologin.
I have tried:
su myuser -c /home/myuser/script.sh
Result: This account is currently not available.
With chown…

Karl
- 103
- 1
- 1
- 4
10
votes
1 answer
Init script does not create a PID file
I need to create an init script for an IRC logger. I copied /etc/init.d/skeleton. I filled in the configuration section to fit my needs and I also had to add --background to the start daemon command since my IRC logger doesn't split off. The logger…

Cory Walker
- 236
- 2
- 4
- 11
9
votes
2 answers
Call to daemon in a /etc/init.d script is blocking, not running in background
I have a Perl script that I want to daemonize. Basically this perl script will read a directory every 30 seconds, read the files that it finds and then process the data. To keep it simple here consider the following Perl script (called…

tony
- 191
- 1
- 3
8
votes
2 answers
systemd ignores return code while starting service
I ran into this problem while writing unit-file for one simple daemon. When daemon returns '1' on startup systemd just ignores it, and it looks like daemon was started successfully while it's actually dead.
For example, I have very simple shell…

Paul K.
- 125
- 1
- 1
- 9
8
votes
3 answers
Why does NTP daemon keep listening on UDP6?
I have a clean Debian 7 installation, and I manually entered the following lines in /etc/ntp.conf:
interface ignore wildcard
interface listen
Hoping that NTP will no longer listen on UDP6, but after a restart, it still does:
5:udp …

Howard
- 303
- 2
- 4
- 11
8
votes
1 answer
Safely providing passwords to a linux daemon
I have a linux daemon that accesses some services (db etc). It needs some passwords for this. What would be the best way to give the passwords to the daemon in a secure manner?
I currently store the passwords in a root-read-only config file, but it…

arnuschky
- 418
- 4
- 12
8
votes
2 answers
daemon function isn't working in CentOS 6.4
I'm trying to daemonize a process under a different user.
In my init.d, I have a service which looks a little bit like this:
...
start() {
echo "Starting mydaemon..."
daemon --user someuser --name mydaemon mycommand
}
...
(entire script…

Chris Watts
- 265
- 1
- 3
- 11
8
votes
4 answers
Should a foreground program invoked by a daemon split logging between stderr and stdout based on severity levels?
Usually log messages are written to stderr. I'm wondering if it is a good idea/practice to split log messages so that errors and warnings go to stderr while debug/informational/notice messages go to stdout instead? Or is this irrelevant given that…

Rio
- 335
- 2
- 11
8
votes
1 answer
How can I generate a command for start-stop-daemon that will kill the process if it doesn't term during a timeout period?
I need to run a start-stop-daemon for a redis instance and I want it to send a SIGTERM and if the redis instance doesn't quit i would like it to force a quit.
The start-stop-daemon configuration says that the --retry option can be used for that but…

Maurício Linhares
- 183
- 1
- 1
- 5