The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
23 views

Create daemon on ubuntu 16.04

I developed a crawler in PHP that parse an URL with specific headers and put all URLs of content in the queue. It works fine. I developed this code in a ubuntu 14.04 and I put a .conf file in /etc/...
0
votes
2answers
1k views

start-stop-daemon checking for existing running process

I'm starting a Python script that I've created using start-stop-daemon. It works perfectly in all cases, except when I've forgotten that I've already started it. It creates a new process, but is ...
1
vote
2answers
5k views

Issue Starting MySQL Daemon

I have just come across the most random error I've seen my MySQL daemon spew out yet, everything was working fine, then all of a sudden it randomly crashed and it now outputting this when I start it ...
33
votes
8answers
62k 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 ...
1
vote
1answer
396 views

Nginx daemon doesn't want to stop on Ubuntu

I've got an Ubuntu 11.04 i386 server with Nginx 1.0.11. I'm also using this init.d script - the only one I've found. The server starts up well, but each time I'm trying to stop or restart it, the ...
0
votes
1answer
91 views

PHP script with systemd

I'm new to systemd and I've got issue with script my colleague gave me. This script worked as background process in Debian 7 but doesn't in Debian 8. I decided to rewrite it to systemd. I have this ...
0
votes
2answers
4k views

Run mysqld under a different user (linux)

I've been trying to start mysqld under a different user as well as with a different data path. I've done so by modifing the my.cnf file as follows: [mysqld] datadir=/bob/database socket=/bob/database/...
0
votes
0answers
19 views

Adding local docker-deamon to docker-machine?

I've just installed an ubuntu machine with a docker-daemon and I"m able to run docker containers, after that I installed docker-machine and provisioned an ESX machine with docker2boot and I see this ...
0
votes
2answers
5k views

VSFTPd 3.0.2 on Ubuntu 12.04 Init File

I installed the VSFTPd 3.0.2 on Ubuntu 12.04 following this commands: $ wget https://security.appspot.com/downloads/vsftpd-3.0.2.tar.gz $ tar xzvf vsftpd-3.0.2.tar.gz $ cd vsftpd-3.0.2 $ make -j8 $...
1
vote
1answer
20 views

How can I create a log for an existing daemon?

I have a deamon running (that I did not create) and I need to be able to read its logs. Unfortunately, it does not have a log file. Is there a way to pipe the daemon's output into a file, and have it ...
0
votes
1answer
52 views

postgresql - How to deamonize postgres server process for ordinary user

I'm trying to set up a PostgreSQL cluster in my home directory on Debian. EDIT: There are a couple of reasons why I think this a good idea: I don't use Postgres frequently so I don't currently have ...
0
votes
2answers
67 views

Auto-restart commandline process in screen every day

I have a queue script that finds new jobs from the db every second and handles them. Sometimes it doesn't do anything for 10 hours, and sometimes it receives 1000 new jobs in 3 min. The queue works ...
0
votes
0answers
35 views

Upstart - how to convert ubuntu daemon to centos?

On Ubuntu this upstart service did a brilliant job at making sure the app always stayed running (and logged) start on started mountall respawn respawn limit unlimited exec node /var/sentora/hostdata/...
1
vote
2answers
2k views

start-stop-daemon saves wrong PID

$ ps aux | grep svn root **4458** ... /usr/bin/svnserve -d -r /var/svn manuel 4466 ... grep --color=auto svn $ sudo kill **4458** $ sudo rm /var/run/svnserve.pid $ sudo start-stop-daemon --...
4
votes
3answers
9k views

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 <local_nic_ip> Hoping that NTP will no longer ...
13
votes
4answers
20k views

How to stop nginx on Mac OS X

I've installed and configured nginx server on my Mac from MacPorts sudo port install nginx Followed the recommendation from the port installation console and created the launchd startup item for ...
1
vote
0answers
31 views

How to do remote calls from server A to B to create virtual machines

This is my first question on serverfault so I hope I'm doing this right as I'm usually on Stackoverflow :-) I have two Ubuntu 14.04 LTS servers, server A and B. Server A runs the web server where ...
0
votes
0answers
22 views

What's the recommended way to daemonise an executable with Ubuntu?

I've written a golang app that i'd like to run as a daemon: Start automatically on boot Only allow one instance of it to run at a time Run it as a specific user Save the stdout/stderr to a log file ...
0
votes
0answers
157 views

Multiple Gunicorn daemons for Django projects with Nginx result in 502 Bad Gateway for one

I want to run two Django applications on the same server, with Nginx and Gunicorn. I can run them separately, but not both at the same time: When I try, one is OK, but for the other one I receive 502. ...
1
vote
0answers
77 views

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 ...
2
votes
1answer
753 views

Creating Daemons in Linux… how should the file permissions be?

I am setting up a few PHP Gearman Daemons running on PEAR System_Daemon. I need them to be able to write to the following locations... /var/run/{APPNAME}.pid /etc/init.d/{APPNAME} /gearman/log/{...
1
vote
0answers
52 views

“Job failed to start” - Hey but why?

I'm running through an error that's giving me serious headache. Tried to Google for it but all I find is about MySQL which doesn't apply here. I've just updated Node and Ghost (blogging platform) on ...
1
vote
1answer
676 views

What is meant by /sbin/init too old? [closed]

I am trying to use Upstart to daemonize a script. So, I made a .conf file under /etc/init/. Now to check the conf file I did init-checkconf /etc/init/ping_me.conf And it says ERROR: version of /...
1
vote
1answer
323 views

daemon function not found in CentOS 6.6

I am trying to set init.d script for some service - let it be less Here is my script: #!/bin/bash -xv # description: read service #Source function library if [ -x /etc/rc.d/init.d/functions ];then . ...
1
vote
0answers
21 views

how do I set monit to non-daemon mode

I'm trying to get monit to just excite the monitrc script once and then exit. I've tried monit -v -Ic /tmp/monitrc but when I look at the output it says: Runtime constants: Control file ...
7
votes
3answers
10k 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 ...
1
vote
1answer
907 views

How can I force gnu screen to flush its logfile?

I am using screen like this: screen -L -dm -S session1 -c "./game_server -options" to wrap around game servers. I log their output to a file, and can send them input with: screen -r session1 -p0 -...
4
votes
3answers
6k 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 ...
0
votes
3answers
133 views

Daemon for N autossh tunnels

I use autossh to create a persistent tunnel from localhost to remotehost. Starting autossh manually works fine, but if localhost reboots, the tunnel is gone. That's no surprise. How to create a ...
2
votes
1answer
485 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....
0
votes
0answers
18 views

Rsync daemon : prevent the access of all a subtree except one folder by the rsyncd.conf file?

I got a Linux server on RHEL and i need to synchronize some folders from locals machines on Windows(with cygwin) and on linux via a rsync daemon on the serv. The tree are not set identically on the ...
2
votes
3answers
632 views

Bash script as daemon on debian

i have a short script in bash, which need to run as daemon on background. It's based on inotifywait, which should wait for changes on specified folder and in case of any changes it should runs copy ...
3
votes
1answer
210 views

What is the proper way to restart a daemon with Ansible on OSX target?

I created a simple Ansible role with the purpose of configuring dnsmasq on OSX targets (dnsmasq is installed from homebrew). I want to create a handler that would restart the daemon when ...
0
votes
1answer
22 views

How to send a group of command in background

I'm writing my own generic init script, I've taken strategies from here and there and come up with trap 'kill $(jobs -p)' EXIT; until $DAEMON $DAEMONOPTS > /var/log/${NAME}.log 2>&1 & ...
1
vote
1answer
258 views

How to configure a newer version of Supervisord to start on system boot in Ubuntu 12.02?

How do you configure a newer version of supervisor to start on system boot in Ubuntu? Some distributions simply lag behind in their repositories. When I use easy install (as recommended by default on ...
2
votes
3answers
2k views

How do I create an interactive daemon login?

I run a service on a debian/linux machine which runs at boot with a 'screen' session I can always attach to. I would like to create a username which I can run this service as. At the moment I use a '...
0
votes
0answers
135 views

Can I send a command to stdin of a systemd monitored process

I use systemd to monitor a few gameservers. Some of them accept commands at runtime via stdin. Does systemd somehow allow sending input to processes? Pretty much like journalctl, but the other way ...
3
votes
1answer
54 views

Should I rather explicitly run programs in foreground (instead as a daemon), or `expect fork` when configuring upstart daemons?

Many programs allow to be run either in daemon mode (which is usually the default), or explicitly run it in foreground with a flag such as -f. Now when configuring upstart to run programs like this, ...
5
votes
5answers
175 views

Starting a mysql server in my ${HOME}?

I'm not root on my server (linux) and this server doesn't currently run a mysql server as a daemon. Can I start a mysql daemon that would only work for my account and where the data/files would be ...
0
votes
1answer
184 views

MacOS Yosemite: Does setting PATH variable in /Library/LaunchDaemon work?

I launch a thing written in python from plists in /Library/LaunchDaemons in Yosemite and I want it to run some scripots. And it seems not to take PATH fro the plist file. For example if I have this in ...
2
votes
1answer
32 views

chkconfig shows off in all levels but it running

In my CentOS6 machine, chkconfig shows about httpd as below, but running automatically whenever reboot the system. httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off What can I ...
0
votes
0answers
34 views

Cross distro daemon command?

I'm trying to write a script to launch a daemon on both centos and debian. This is the current pseudo script: if [ =f "/etc/init.d/functions" ] then . /etc/unit.d/functions alias ...
0
votes
2answers
54 views

Cannot bind to port > 1007?

I want to bind a server to port 1023. If I specify any free port > 1007, I have a "address already in use" error, but it works for ports <= 1007. Working as root on Debian 7.8... Any idea?? ...
10
votes
3answers
17k views

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

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?
10
votes
1answer
19k views

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 ...
1
vote
2answers
412 views

Unable to get Rsyslog structured data in syslog message

I am new to syslog module. I am trying to log messages with structured data by using this parameter in template. But it is showing null value for structured data. I am working with rsyslogd 5.8.11 ...
2
votes
1answer
613 views

Cleaner way to restart daemontools services

In our product, we had created services using daemontools. One of my service looks like this, /service/test/run /service/test/log/run (has multilog command to log into ./main dir) /service/test/log/...
7
votes
1answer
8k views

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 -...
-4
votes
1answer
34 views

Run two daemon jobs in two different directories [closed]

I want to write a script that would start two daemon jobs in two different directories. This script should run in the foreground, and then when I press ctrl-c, the script would exit and bring down ...
26
votes
2answers
40k 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 ...