Questions tagged [start-stop-daemon]
`start-stop-daemon` is a program used to control the creation and termination of Linux system-level processes (daemons).
97
questions
0
votes
0answers
19 views
start-stop-daemon gracefully end while loop child process on shutdown / restart
So I've got the following for my start-stop-daemon in a service on my ubuntu 20.04 machine:
DIR=/var/www/tools/A
DAEMON=$DIR/main.py
DAEMON_NAME=toolA
DAEMON_OPTS=""
DAEMON_USER=www-data
...
0
votes
0answers
20 views
start-stop-daemon cannot find file but clearly executes it
I'm running a python script on my ubuntu machine which i'd like to daemonize.
I use the following to start the daemon:
DIR="/var/www/tool"
DAEMON="$DIR/main.py"
DAEMON_NAME="...
0
votes
0answers
9 views
Buildroot mountpoint busy after executing script
I have a problem with a buildroot/hotplug/start-stop-deamon assembly.
I have a script on a usb stick, which is executed via a mdev hotplug handler.
The script stays in its read only auto mount ...
0
votes
0answers
38 views
/sbin/start-stop-daemon --status returns 0 for non-running process
I am using /sbin/start-stop-daemon --status to check the status of process in Ubuntu1804.
But found that --status returns 0 for non-running process, which is not expected.
> cat /tmp/test.pid
>&...
0
votes
2answers
134 views
start-stop-daemon with --background vs running using & option
What is the difference in running a process in background using start-stop-daemon with --background option and using with &?Which option is best and why?
0
votes
0answers
13 views
Hadoop daemon , Datanode missing
I tried clearing /app/Hadoop/temp directory and creating it again and assinging permission chmod and chown, after this datanode appears but when starting terminal again makes datanode disappears.
1
vote
2answers
877 views
Gracefully shutdown a generic host in .NET Core 2 linux daemon
I'm completely new with both .NET Core and developing linux daemons. I've been through a couple of similar questions like Killing gracefully a .NET Core daemon running on Linux or Graceful shutdown ...
2
votes
2answers
14k views
why “systemctl” not working in Ubuntu terminal on Windows?
I need to reload the daemon using systemctl command in ubuntu terminal on window 10. I attached the error I received. Please Help me on this.
error:
bashdos@yana:~$ systemctl
System has not been ...
0
votes
1answer
2k views
Run Superset as Service
I have configured my superset in Virtual env want to run it as a service
I have tried using below config but its not working
[Unit]
Description=superset service
After=network.target
[Service]
Type=...
0
votes
0answers
25 views
How to troubleshoot services in Rapsberry Pi 3B
I have never done a service before in linux perse, but I been trying to make a service using a Pi.
I used 2 different approaches to create a service. The first approach was using the systemctl using ...
0
votes
1answer
14 views
start-stop-daemon error write to disk (some text)
Have C++ server program that writes logs to disk.
Starting it from php script
shell_exec("start-stop-daemon -Sbvx /home/my_server.out");
inside this program:
ofstream log_file("/home/log.txt");
...
0
votes
2answers
72 views
Can't read stdout output of external commands after deamonizing Python script
I wrote a RPC server foo in Python that I deamonized with
start-stop-daemon --start --quiet --background \
--make-pidfile \
--pidfile /var/run/foo.pid \
...
0
votes
0answers
138 views
Celeryd with django
I've been trying to run a celeryd (celery 3.1.25) service for my django project, but when I define
CELERYD_USER="www-data"
CELERYD_GROUP="www-data"
in /etc/default/celeryd which seems to be used a ...
0
votes
1answer
6k views
how to create a PID file for a java process
I'm attempting to create a PID file like below:
LOCKFILE=/var/lock/ocr-trafficcop.lock
PIDFILE=/var/run/ocr-trafficcop.pid
JVM_ARGS="-Xms1024M -Xmx2048m -Dspring.config.location=/opt/app/configs/ocr-...
3
votes
1answer
7k views
Odoo service restart and update using systemctl
Odoo service is started by systemctl start odoo. I am usin Centos. When I want to update my changed *.py code I used to do like this:
1. systemctl stop odoo
Then I update my module and database by ...
0
votes
2answers
792 views
Start service with start-stop-daemon on Ubuntu 16.04 with timeout
I have /etc/init.d/stream proces with start/stop/restart options.
It's run ffmpeg with daemon options taken from /etc/default/stream DAEMON_OPTIONS.
Start at background (-b) crate pid (/var/run/stream/...
1
vote
0answers
34 views
Forked init.d process becomes unresponsive
I have a script to start and fork a netcat process. After a while, the netcat process stops logging output. Remote computers are supposed to connect to the socket and send a message every few hours, ...
0
votes
1answer
2k views
LaunchDaemons is giving error 127
i have a problem when i run LaunchDaemons this is my .plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/...
7
votes
2answers
5k views
How to process SIGTERM signal gracefully in Java?
Let's assume we have such a trivial daemon written in java:
public class Hellow {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
...
0
votes
0answers
495 views
Multiprocessing queue python-daemon
I need linux daemon on python with multiprocessing queue.
I allready trying python demonize but it's have an issue with pid's,access rights and start/stop funcs.
This is opion through python-daemon ...
0
votes
1answer
556 views
Linux start-stop-daemon directory error calling shell/python script
I am just getting acquainted with Linux and I cannot seem to get the start-stop-daemon to run a python script due to directory issues. In a linux file structure I have the files:
~/test.txt
THIS ...
0
votes
1answer
788 views
Logging error output from a php script called from start-stop-daemon
I'm testing the logging the output of a simple php script being run via the start-stop daemon on Ubuntu.
The content of the test script, loop.php, is as follows:
<?php
while (true) {
...
0
votes
1answer
379 views
Convert Command line to a service in ubuntu 16.04 LTS
When I am running a command bitcore-node start it starts two services.
Screenshot of ps aux is attached.
I created a service in /etc/init.d
description "Bitcoin Core for Bitcore"
author "...
3
votes
2answers
3k views
Puma does not start after server reboot
I deployed project with capistrano, but puma does not start after server reboot..
I shoul do -> cap production puma:start every time
I tried it:
/etc/init.d/myscript
#!/bin/sh
/etc/init.d/...
1
vote
1answer
1k views
How can I get start-stop-daemon to write the child process ID to the pid file?
I'm writing an init.d script to start a program that I've written in C. The program follows a pretty standard template where it calls fork() to create a child process, and then the parent process ...
0
votes
2answers
237 views
How do I guarantee that I have a process always up and running?
Is it more reliable to use daemontools or supervisord, or that I use crontab that runs a script of mine to keep checking if the process still exists and if not, start it again?
What is the best way ...
2
votes
2answers
2k views
RHEL7 systemd start mongo services automatically?
I have a RHEL7 server that is part of a Mongo cluster. There are three mongo processes that I would like to be automatically started on system boot. One mongod, one arbiter and one mongos:
/usr/bin/...
0
votes
1answer
479 views
Delayed jobs stops after some time
I have an application which relies heavily on delayed jobs. So I have setup two servers, one of which servers up the application (m3.medium ec2 instance) while other one runs my delayed jobs(t2.micro ...
1
vote
2answers
3k views
How to properly start/stop CouchDB 2.0 on Ubuntu
I have installed CouchDB 2.0 on Ubuntu 16.04, and can run it fine by launching ~couchdb/bin/couchdb.
Now I would like to make it start and stop properly on system boot/shutdown.
The doc states that ...
1
vote
1answer
966 views
sbin/start-stop-daemon not able to start python - ubuntu docker container
I have a simple python script which I want to start a daemon-service in background in docker container
/sbin/start-stop-daemon --start --user root --make-pidfile --pidfile /var/lock/subsys/my-...
0
votes
2answers
390 views
Simple daemon process in Ubuntu
I want to start a simple daemon process in Ubuntu, which will write the current time to log file every 5 seconds.
start-stop-daemon --start --user root --make-pidfile --pidfile /home/manjesh/test....
1
vote
1answer
84 views
Catalyst exiting when started with start-stop-daemon
I am trying to run Catalyst on CentOS 7 using start-stop-daemon. Here is the start-stop-daemon command that I run:
start-stop-daemon --start --pidfile /var/run/myapp.pid -d "/home/user/myapp" --exec /...
1
vote
0answers
5k views
Configuring Motion to run as daemon in Raspberry and right (?) issues
I'm able to tun my motion detection in my Raspberry 2:
In /etc/default/motion
I changed start_motion_daemon=no to start_motion_daemon=yes
Next I enabled motion by entering the following at the ...
0
votes
2answers
832 views
How to Start/Stop Tomcat for normal user except root in Linux CentOS
I just install Tomcat6 in my Linux CentOS and I just want user to Start/Stop Tomcat without permission denied, there only root have no permission to do so.
Any solutions?
Thanks.
10
votes
2answers
20k views
How to gracefuly shutdown a Spring Boot application by start-stop-daemon [duplicate]
We have a multithreaded Spring Boot Application, which runs on Linux machine as a daemon. When I try to stop the application by start-stop-daemon like this
start-stop-daemon --stop --quiet --retry=...
0
votes
0answers
91 views
Is there any way to implement stop() for Standalone Spring Boot application as a service/daemon?
I'd like to know how to implement stop() method as Apache Commons Daemon provides on Spring Boot.
I read the related documentation from https://docs.spring.io/spring-boot/docs/current/reference/html/...
2
votes
1answer
3k views
custom linux daemon won't stop using “service stop”
I've written a custom python daemon that runs as a service via an init.d script on ubuntu 14.04. Starting the service works fine, but when I try to do "service monitor stop", the daemon is not ...
0
votes
1answer
575 views
Python daemon starts correctly with init-script but fails on startup
I have some python daemons for raspberry pi applications running on startup with init-scripts.
The init script runs fine from the console, starts and ends the background process correctly.
The ...
0
votes
0answers
785 views
start-stop-daemon does not start java process
I am trying to execute this script with the "start" option:
#!/bin/sh
DESC="Jenkins CI Server"
NAME=jenkins
PIDFILE=$NAME.pid
RUN_AS=alex
COMMAND="/usr/bin/java"
COMMAND_ARGS="-jar jenkins.war"
...
0
votes
1answer
439 views
Run a php script as daemon on raspban
I wrote a working PHP script with an endless while (true) loop as a Websocket server.
Could you help me with:
starting the PHP script on boot ?
start stop the PHP script via ssh ?
I read about PHP ...
0
votes
0answers
58 views
How to turn a ls loop into different variables?
Let me redo my question:
OK, newb here but here is what I am trying to do:
I am trying to write an init script that pulls different config files and pass them into different variables. The END ...
4
votes
4answers
6k views
Ansible cannot make dir /$HOME/.ansible/cp
I'm getting a very strange error when I run ansible:
GATHERING FACTS ***************************************************************
fatal: [i-0f55b6a4] => Could not make dir /$HOME/.ansible/cp: [...
0
votes
1answer
2k views
What is the proper way to terminate a script using start-stop-daemon?
I am using a start-stop-daemon to make a INIT script for my script. I am using --make-pidfile cause my script doesn't make its own pid. I can start my script using start and pid file generates with ...
0
votes
1answer
951 views
start-stop-daemon doesn't detect already running daemon
I tried to copy /etc/init.d/skeleton and modify it to start a program in background. I came up with the following:
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon ...
0
votes
0answers
89 views
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....
1
vote
1answer
890 views
Changing process name when running Python as daemon
I found this excellent website which gives an example upstart script for running Python scripts as daemons. My question is, can I change the name it reports as when I type ps -e?
I was thinking start-...
1
vote
0answers
381 views
Python script as service in init.d, is it worth to daemonize?
I have few python scripts that I want to have as a service in a system. My initial approach was to use python-daemon and it worked. Process was detached and running in the background. Then I have ...
5
votes
1answer
7k views
Debian start-stop-daemon. Java start jar File
I have this command in a shellscript in /etc/init.d/
start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/$NAME.pid --background --exec /usr/bin/java -jar /home/username/myjar.jar
If ...
1
vote
1answer
974 views
Stop Daemon not terminating child java process
following setup
Start-Stop-Daemon:
do_start
start-stop-daemon -S -m -p $PIDFILE --name myapp --exec /opt/myapp
do_stop
start-stop-daemon -K -R TERM/30/KILL/5 -p $PIDFILE --name myapp
the script I ...
1
vote
2answers
1k views
Solr upstart script using start-stop-daemon
I want to start my solr using upstart command.
The command I use to start solar normally is
/usr/bin/java \
-Dsolr.solr.home=/home/justeat/work/projects/solr/apache-solr-4.0.0/example/solr \
-Djetty....