Questions tagged [start-stop-daemon]

`start-stop-daemon` is a program used to control the creation and termination of Linux system-level processes (daemons).

start-stop-daemon is a program used to control the creation and termination of Linux system-level processes (daemons). Using one of the matching options, start-stop-daemoncan be configured to find existing instances of a running process.

The man page specifies below note:

Note: unless --pidfile is specified, start-stop-daemon behaves similar to killall(1). start-stop-daemon will scan the process table looking for any processes which match the process name, uid, and/or gid (if specified). Any matching process will prevent --start from starting the daemon. All matching processes will be sent the TERM signal (or the one specified via --signal or --retry) if --stop is specified. For daemons which have long-lived children which need to live through a --stop, you must specify a pidfile.

Usage sample:

start-stop-daemon --start --background -m --pidfile ${PIDFILE} --exec ${DAEMON} -- ${TARGETDIR}

Command arguments explanation:

  • --start : Check for an instance of the specified process and start it (if not already started).
  • --background : the daemon is launched as a background process.
  • -m : make a PID file. This is used when your process doesn't create its own PID file, and is used with --background.
  • --pidfile ${PIDFILE} : check if the PID file has been created or not.
  • --exec : make sure the processes are instances of this executable (in this case, DAEMON)

For more informations and more options, check the man page.

100 questions
0
votes
0 answers

start-stop-daemon and javaFX program

this is driving me crazy, please could you help with the start-stop-daemon to start a javafx jar file, where I need to issue the following command to start it sudo /opt/jdk1.8.0/bin/java -Djavafx.platform=eglfb -cp…
Ossama
  • 2,401
  • 7
  • 46
  • 83
0
votes
1 answer

python daemon not calling other python script

I am using python daemon to check a particular table in mongodb if there is any value it should call another python script. Below is the code what I am trying, but it doesn't call the script. can somebody help me out: import daemon import…
Abhilash Kumar
  • 211
  • 1
  • 9
0
votes
1 answer

start-stop-daemon weird behaviour

I'm creating a pallet crate for elasticsearch. I was stuck on the service not starting however after looking at the logs it seems that it's not really anything to do with pallet. I am using the elasticsearch apt package for 1.0 which includes an…
shmish111
  • 3,697
  • 5
  • 30
  • 52
0
votes
0 answers

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/main/.. All the process and its directories are…
Prabu
  • 1,225
  • 4
  • 18
  • 26
0
votes
1 answer

Minecraft server script to start on reboot

I am using a script I found on a minecraft wiki to automatically start my minecraft server after I reboot. console log exec start-stop-daemon --stop "stop" --start --chdir /minecraft --chuid minecraft \ --exec /usr/bin/java -- -Xms1536m -Xmx2048M…
brotherchris
  • 47
  • 10
0
votes
1 answer

Starting a rake task as daemon

I'm trying to daemonize a rake task by running the following command (on Ubuntu 12.04) start-stop-daemon -S --pidfile /home/dep/apps/fid/current/tmp/pids/que.pid -u dep -d /home/dep/apps/fid/current -b -m -a "bundle exec rake que:work…
Sig
  • 5,476
  • 10
  • 49
  • 89
0
votes
1 answer

start-stop-daemon not sending SIGTERM

I have a simple daemon that boils down to #include #include #include #include #include #include bool running = true; std::ofstream log_output; void close_log_output() { …
Joe
  • 6,497
  • 4
  • 29
  • 55
0
votes
0 answers

How can I use start-stop-daemon to start a mpi task?

I use demo.sh to start a daemon mpi task: #! /bin/sh if ! kill -0 $(cat pid) > /dev/null 2>&1 then /sbin/start-stop-daemon -p pid -m pid --start --background --exec mpirun -n 2 a.out fi But it can not work, how can I use start-stop-daemon to…
xunzhang
  • 2,838
  • 6
  • 27
  • 44
0
votes
2 answers

How do I stop a daemon thread that does scheduled database backup ?

I've written a very simple command line programme that uses mysqldump to dump data at a specified interval. I wanted it to be running after I run the programme and I disconnect putty ssh connection. But as soon as I exit the ssh connection, the…
Ascendant
  • 827
  • 2
  • 16
  • 34
0
votes
1 answer

shibd_Default service cannot be started

While working on configuring the Shibbolet SP, I had to stop and start the shibd service many times after reconfiguring the shibboleth2.xml file. first it worked ok, but then I couldn't start it again! when running this command on cmd C:\>net start…
Ruba
  • 867
  • 3
  • 11
  • 19
1 2 3 4 5 6
7