Questions tagged [daemon]

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.

Filter by
Sorted by
Tagged with
74 votes
2 answers
69k views

Create a directory under /var/run at boot

I had a daemon that needed its own dir in /var/run for its PID file with write permission granted to the daemon's user. I found I could create this dir with these commands: # mkdir /var/run/mydaemon ...
user24601's user avatar
  • 993
55 votes
4 answers
94k views

Start N processes with one systemd service file

I found this systemd service file to start autossh to keep up a ssh tunnel: https://gist.github.com/thomasfr/9707568 [Unit] Description=Keeps a tunnel to 'remote.example.com' open After=network....
guettli's user avatar
  • 3,823
17 votes
7 answers
49k views

Too many open files on Debian

I have long running process at Debian. At some point in throw an error: Too many open files. Running: ulimit -a shows: open files (-n) 1024 I wish to increase number ...
FoxyBOA's user avatar
  • 417
38 votes
7 answers
168k views

How to automatically start supervisord on Linux (Ubuntu)

Supervisord does not come with an init script or does not indicate how to get it started automatically, ie. after a reboot. I've tried some user-contributed /etc/init.d scripts, but they all fail. ...
user avatar
8 votes
3 answers
19k views

Ways to set umask on Ubuntu for daemon processes

I have an http daemon server process (yaws) that I would like to have server write any new files with a umask of 002, so that another user in the same group can modify, move, or delete files created ...
mp3foley's user avatar
  • 618
2 votes
1 answer
8k views

How to configure Python Script to run as a daemon

I have a couple webservers sitting behind a loadbalancer, and i found "watcher.py" here: https://github.com/splitbrain/Watcher I chose this script for several reasons: recursive through folders, lots ...
Ace's user avatar
  • 155
68 votes
11 answers
187k views

Disable a service from starting at all runlevels?

I have a service foo which currently starts at runlevel 3 and above. How can I stop it from doing so, without using update-rc.d foo stop 3 ., which (if I understand it correctly) would turn off the ...
lfaraone's user avatar
  • 1,621
67 votes
4 answers
199k views

What is the difference between syslog, rsyslog and syslog-ng? [closed]

I am a bit confused in syslog, rsyslog and syslog-ng. From where can I get the source code for syslog()? Is there any difference between rsyslog and rsyslogd?
StackUser's user avatar
  • 803
53 votes
4 answers
198k views

Configuring Systemd Service to run with root access

I have a service in the form of a node.js application set up with Systemd on Raspbian Jessie and it is using its own user account. However, I am finding that the service does not run correctly because ...
Luke's user avatar
  • 577
34 votes
4 answers
77k views

public key authentication fails ONLY when sshd is daemon

I have no clue on how this happens. The distro is Scientific Linux 6.1 and everything is set up to perform authentication via public key. Yet, when sshd is running as a daemon (service sshd start), it ...
user666412's user avatar
16 votes
5 answers
26k views

Standard or best way to keep alive process started by init.d

I'm looking for a standard way or best practice to keep a daemon started by an init.d shell script alive. Or even better, is there a way to keep it alive directly from /etc/init.d? Specifically, I ...
Adrian Antunez's user avatar
12 votes
3 answers
16k views

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 ...
scottburton11's user avatar
11 votes
5 answers
32k views

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 ...
Alexandr Kurilin's user avatar
9 votes
2 answers
4k views

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 ...
tony's user avatar
  • 191
9 votes
4 answers
8k views

How to tell if an ssh ControlMaster connection is in use

I'd like to use ssh's ControlMaster feature to share connections for speed increases. I'm trying to script it so that I can start/restart/stop a number of connections to different hosts. How can I ...
David Fraser's user avatar
5 votes
4 answers
14k views

How do I find out the process id of the backgrounded process?

I've got a command (program) that I'd like to run with nohup and background it. Like nohup command > logfile.txt & How do I find out the process ID? I would like to be able to write the ...
user avatar
5 votes
2 answers
22k views

init script that logs output of the script

How can this be done? I know it's pretty simple and includes appending something like & or &> to the actual command that starts the init script. But, what is the best approach and how can ...
kapeels's user avatar
  • 355
4 votes
1 answer
4k views

Rename mailer-daemon in postfix

Is there a way to rename the email adress of [email protected] to some other (e.g. [email protected])? I need that the sender of the "Non delivery report" has other email adress than ...
jan2jen's user avatar
  • 41
3 votes
7 answers
4k views

Shell script to execute something when one of the daemon dies?

I just had to build two instances of daemon running on different ports. let's say they both serve critical missions for some applications. How can I do some automatic task (eg. shell script) ...
racbear's user avatar
  • 99
0 votes
1 answer
1k views

Autostart/restart program simply with daemontools in debian 9 [closed]

For example make vlc start and play a video full screen on boot. After working this out here it is:
Hayden Thring's user avatar