Questions tagged [start-stop-daemon]
24 questions
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
8
votes
5 answers
Supplying password to openconnect started via start-stop-daemon
I am attempting to start openconnect via a Debian init script that makes use of start-stop-daemon:
DAEMON=/usr/sbin/openconnect
DAEMON_ARGS=" --script /etc/vpnc/vpnc-script --user --pid-file $PIDFILE --passwd-on-stdin"
PASSWORD=`cat…
Thilo-Alexander Ginkel
- 306
- 2
- 3
- 10
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
- 5
7
votes
3 answers
PHP-FPM service status `stop/waiting` but workers are running?
Starting php5-fpm appears to work, but checking the status immediately shows that it is not running:
[root@server ~]# service php5-fpm start
php5-fpm start/running, process 4516
[root@server ~]# service php5-fpm status
php5-fpm stop/waiting
Even…
Nick
- 4,433
- 29
- 67
- 95
3
votes
2 answers
/bin/sh: difference between variable and direct command
Imagine i have following bash script:
#/bin/sh
#next line will work correctly, outputting user name and current directory
start-stop-daemon --start --exec /bin/su -- root -c 'whoami; ls'
MYVAR="start-stop-daemon --start --exec /bin/su -- root -c…
Sergey Alaev
- 253
- 1
- 7
2
votes
1 answer
How to start git-daemon at boot?
I've created scripts to control starting, stopping, etc. of my git-daemon on Fedora28. I'm now attempting to link these scripts to a systemd service so git-daemon will be available after reboot.
The primary script (gitT) is...
#!/bin/bash
case "$1"…
dacracot
- 469
- 2
- 12
- 28
2
votes
1 answer
start-stop-daemon not working as expected
I can't figure out why start-stop-daemon is not running the script below. What am I doing wrong? start-stop-daemon reports that it will start node when using the --test flag, but when I actually run the process isn't started.
root@server:~# cat…
mhingston
- 21
- 3
2
votes
1 answer
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
- 121
- 2
2
votes
2 answers
Proper Bash Daemon Script Creation
On Ubuntu, I copied /etc/init.d/skeleton as a new file and made it "all" executable (just like the others in that directory). In it, I made a "foo" that was just another Bash script in /usr/sbin, but it was special in that it sits in a loop waiting…
ServerChecker
- 1,498
- 2
- 14
- 32
1
vote
0 answers
Debian 8/init.d: start daemon after "$named" is ready
I am trying to start a init.d daemon on Debian 8 after network and DNS is up and running. That's the script I am using:
### BEGIN INIT INFO
# Provides: local_daemon
# Required-Start: $all $local_fs $remote_fs $network $named $time…
noblemaster
- 111
- 2
1
vote
1 answer
Whats the proper what 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 doesnt make its own pid. I can start my script using start and pid file generates with appropriate PID. But the stop function doesnt work.…
user3360140
- 281
- 1
- 4
- 13
1
vote
1 answer
Starting lighttpd from nagios renders lighttpd broken
I'm using Debian 7.8 (wheezy), and lighttpd 1.4.31 with nagios 3.4.1.
when I start lighttpd normally (as root), everything works as expected:
/etc/init.d/lighttpd start
However, when nagios starts lighttpd, everything issues a 404 error, and…
Flimzy
- 2,375
- 17
- 26
1
vote
1 answer
(initscripts) Execute a command, if the command does not complete in 10 seconds, run another
On (Debian) Linux I want to:
Execute a command.
If the command doesn't complete in 10 seconds, kill it and try another command.
The use-case is:
I have a daemon service which I would like to shut down gracefully.
It can be stopped by sending a TCP…
bryan_basho
- 91
- 5
1
vote
2 answers
What things are messed up after reboot in Linux? Very strange issue: LDAPS stops working only after reboot
I have a Centos 6.3 virtualbox VM snapshot with LDAPS (openldap) set up. I've set up it few days ago following tips from different sources and wrote down everything afterwards. But when I try to repeat installation (following my own instructions), I…
Dmitriusan
- 357
- 3
- 13
1
vote
2 answers
What is the maximum allowable startup time for a daemon startup script?
What is the maximum allowable startup time for a daemon startup script?
I do have a tomcat server that takes a lot of time to start and I could include logic inside the startup script to check if the service successfully started or not.
Still, I…
sorin
- 7,668
- 24
- 75
- 100