Questions tagged [init.d]

The init.d directory contains a number of start/stop scripts for various services on a Linux system.

The init.d directory contains a number of start/stop scripts for various services on a Linux system.

291 questions
10
votes
4 answers

init.d scripts written in Python

A question came up on StackOverflow asking about writing init.d scripts in Python. One comment indicated that these scripts should be programmed in shell, not Python. Is writing init.d scripts in Python: Bad. Bad. Bad. Never do this. Not a…
mjhm
  • 265
  • 2
  • 6
9
votes
2 answers

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 consider the following Perl script (called…
tony
  • 191
  • 1
  • 3
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…
8
votes
1 answer

PATH issues for init.d scripts on startup

I have a simple script that starts up a unicorn instance (on Ubuntu 12.04LTS). #!/bin/sh case "$1" in start) echo "starting" cd /path && bundle exec unicorn -c /path/config/unicorn.rb -D -E production ;; stop) …
Peterdk
  • 183
  • 1
  • 1
  • 6
8
votes
2 answers

How do I run a Debian init.d script manually, not at boot?

How do I stop an init.d server from running on boot, but still allow running it manually?
Matthew Flaschen
  • 868
  • 2
  • 7
  • 11
8
votes
2 answers

Getting shell script to run as a daemon on CentOS?

EDIT: For some reason half of my post got truncated, not sure what happened. I will update soon and will post that it is updated here at the top. EDIT: I have updated the post again, sorry for the incomplete question. EDIT (8:55PM EST 10/10/2011):…
Lester Peabody
  • 205
  • 1
  • 2
  • 9
8
votes
1 answer

insserv: There is a loop between service foo and bar if started... Breaks aptitude

Does anyone know how to resolve these init errors that happen from the Cyberpower powerpanel for linux package? Ref: http://www.cyberpowersystems.com/products/management-software/ppl.html - I tried using nut instead, but it has issues, namely Debian…
NginUS
  • 468
  • 1
  • 5
  • 13
7
votes
1 answer

Providing normal users(non-root) with initialization and shutdown auto-run capabilities

I'm hosting an experimental/testing Linux box, running Debian Wheezy 7.4.0 distribution. Different users log into the machine over ssh to their accounts and are allowed to run the development tools and leave their programs running as services in…
Ivan Kovacevic
  • 1,801
  • 3
  • 15
  • 19
7
votes
1 answer

Is it possible to use perl, python, php, ruby or whatever to write init.d scripts?

I'm new to this SysOp stuff, so I'm wondering if it's possible to use other interpreted languages to write init.d scripts? The upfront diff for me is /bin vs.…
Lockhead
  • 95
  • 3
7
votes
4 answers

No coredumps for daemons started at boot by init.d on Ubuntu

How can I get daemons started by init.d at boot to coredump on Ubuntu? This is what I have done so far... echo "ulimit -c unlimited" >> /etc/profile mkdir /corefiles/ chmod 777 /corefiles/ echo "kernel.core_pattern=/corefiles/core.%e.%u.%t" >>…
user16517
  • 233
  • 1
  • 4
  • 9
6
votes
2 answers

Parse error in sudoers file

I've created a user called kafka to whom I am trying to give a sudo access to run only /etc/init.d/kafka commands. I added the following entry to /etc/sudoers.d/kafka via Ansible: kafka ALL = NOPASSWD: /etc/init.d/kafka However, this breaks sudo…
jeffreyveon
  • 3,245
  • 3
  • 15
  • 7
6
votes
2 answers

Start PHP-FPM with root option automatically

I was trying to get PHP-FPM running a pool as root, but I can't seem to adjust the init.d startup params. It works when starting PHP-FPM from the CLI (with sudo php-fpm7.0 -DRy /etc/php/7.0/fpm/php-fpm.conf, but I can't get this to work with the…
redelschaap
  • 235
  • 1
  • 3
  • 14
6
votes
3 answers

Centos 6.5 auditd fails to start with service or /etc/init.d/audit start

Fail: # service auditd start Starting auditd: [FAILED] Fail: # /etc/init.d/auditd start Starting auditd: [FAILED] And frustatingly - works: # bash…
Jepper
  • 366
  • 1
  • 4
  • 13
6
votes
3 answers

Service is not starting on Centos on boot

I have a service installed to start jasper reporting server on boot. I believe it is correctly setup. here is the startup script placed in /etc/init.d/jasperserver #!/bin/sh ### BEGIN INIT INFO # Provides: jasperserver # Required-Start: #…
silverdagger
  • 154
  • 1
  • 1
  • 8
6
votes
2 answers

Passing Arguments to a Service started with Init.d

I want to start mysql with the command argument "--log=log_file_name" What is the proper way to do that when starting it with /etc/init.d? Would it be like this? /etc/init.d/mysql start --log=log_file_name
JamesHoux
  • 257
  • 1
  • 3
  • 8
1
2
3
19 20