The tag has no wiki summary.

learn more… | top users | synonyms

13
votes
2answers
796 views

How secure is keeping non-root owned scripts in /etc/init.d?

I have an application which runs as a daemon and is controlled by a script in /etc/init.d Sometimes we need to change some parameters of startup/control of these scripts and then restart the daemon. ...
7
votes
1answer
1k views

What is the difference between start-stop-daemon and running with &?

I am setting up a service in /etc/init.d. I am looking at various scripts in there, some are implemented with start-stop-daemon ... and some with /path/to/script &. All of them save the pid in a ...
6
votes
2answers
888 views

How to regenerate /etc/init.d/.depend.(boot|start|stop) on Debian?

Suppose one deleted the following files. /etc/init.d/.depend.boot /etc/init.d/.depend.start /etc/init.d/.depend.stop How to regenerate them?
6
votes
1answer
331 views

Is it possible to write portable service scripts to control a daemon?

I (or one of my colleagues) need to write one or more shell scripts to control the execution of a daemon. We need to be able to start the daemon, tell it to gracefully shut down, and force a shutdown. ...
5
votes
2answers
589 views

What's the difference between /etc/rc.d/rc*.d and /etc/rc*.d

I know that rc*.d directories are used at startup, or reboot, or so on time, for starting or stopping programs. Can anybody explain me what's the difference between the rc*.d folders placed under the ...
5
votes
2answers
780 views

Is it possible to execute a script as first at shutdown/reboot on Debian?

I am currently trying to register a script (located in the /etc/init.d) in a way that makes this script being executed as the first script/programm at shutdown/reboot (change to running level 0 or 6). ...
4
votes
2answers
429 views

When running to a run level does it execute previous run levels?

If I tell my system to go to run level 3 does that mean that it first runs through run level 0, 1, 2, and then finally runs through run level 3? I thought the answer to this question was yes. But ...
4
votes
1answer
7k views

How do I set the user of php-fpm to be php-user instead of www-data?

I am using php-fpm on debian with nginx for php5 support. I would like to have php-fpm to be under the user&group php-user instead of www-data. I thought the init.d script would have the user ...
4
votes
2answers
52 views

Trigger an init script when a specific device is up and a kernel module has been loaded

On my ubuntu 12.04 servers, I need to write an init.d script that waits until the infiniband interface (device: mlx4_0, interface: ib0) is completely up, and until the knem kernel module is loaded. ...
4
votes
1answer
121 views

How does init determine which devices to modprobe?

I'm building a totally custom initramfs for a netbooting project and in the process learning a lot about it, but I'm a little puzzled by the loading of modules. I know modprobe can be used to load ...
4
votes
2answers
3k views

Run script on start up after everything else

OK, so there's a service (nagios) running on a Debian box that runs just fine, except for one very specific issue that only occurs after the box has been re-started. The issue is easily fixed by ...
4
votes
3answers
1k views

Use start-stop-daemon for a PHP server

I'm working on a socket server written in PHP. This part of the work is done but now I need to run it as a daemon. For this I've tried to use start-stop-daemon but it doesn't work. My server is ...
3
votes
4answers
18k views

How to run my script after SuSE finished booting up?

I want my server to notify me (via growl) that the (re)booting finished. I have the php file that sends out the growl ready but I do not know what file I should add the line in. What file I need to ...
3
votes
2answers
165 views

How to make /etc/init.d script act like it's launched under X?

I'm trying to track down some quirkiness with a Java application that misbehaves when launched via a startup script in /etc/init.d , but runs fine when you open a GUI terminal window and run it ...
3
votes
1answer
650 views

PID file not accessible after update of nginx

After I removed the version 0.7.x which was delivered by the Debian standard packages, I installed the version 1.4.1 of nginx by source. It is possible to start nginx with service nginx start and I ...
3
votes
1answer
1k views

Where is my /etc/init.d/skeleton on OpenSuse 12.3?

On a fresh install of OpenSuse 12.3, I want to "daemonize" a program. And, on all examples found on Internet, I see I have to create first a /etc/init.d/myscript based on the /etc/init.d/skeleton... ...
3
votes
2answers
370 views

How to update an init script

What is the proper way to update an init script an ubuntu system? I am trying to upgrade my version of gitlab from 6-0 to 6-1, part of the upgrade consists of replacing the init script. Upgrade ...
3
votes
1answer
5k views

Create and control start up scripts in BusyBox

I have compiled a custom linux kernel in BusyBox. BusyBox init does not support runlevels. When the kernel boots up in BusyBox, it first executes init which looks for the specified runlevel in ...
2
votes
2answers
443 views

How do I force booting in text mode?

Newer Linux distributions have the idea to boot into graphics modes. The grub menu does this. The init.d system does this. X does this. I can justify X. But both grub and init.d have only caused ...
2
votes
2answers
71 views

Postponing ntpd

I am currently trying to cut boot time for an embedded Linux system. One way we figured we could do that is by postponing the ntp init.d script. The daemon tried to synchronize with the server via ...
2
votes
2answers
958 views

Why is rcS required after file system is mounted by the kernel?

I am a beginner in embedded Linux, I have compiled the kernel without initramfs and kernel is booting fine. But It shows me rcS file is not found I have put it in /etc/init.d/rcS and my rcS file look ...
2
votes
2answers
625 views

editing /etc/init.d/rc.local to run after login tty processes

doing a ps-e, I see the following on startup: PID TTY CMD ... 1880 ? my_auto_script 1881 tty1 login 1882 tty2 getty ... my_auto_script is called from /etc/rc.local. I have /etc/init.d/rc.local ...
2
votes
2answers
853 views

init.d script causes boot hang

I successfully installed a script to automatically launch in /etc/init.d on my new Raspberry Pi. Unfortunately, it is a node.js app that never returns, and therefore hangs the device during boot ...
2
votes
1answer
23 views

Late running of scripts during bootup, ending with a reboot without the login prompt

I'm making a special "installer" for an embedded system where I'd like the kernel to boot up, execute a set of things very late in the process where the peripherals have been set up and then reboot ...
2
votes
2answers
58 views

How can I make this System V init script start at boot?

I've installed udisks-glue on my Raspbian Raspberry Pi, along with a System V init script at /etc/init.d/udisks-glue (as per instructions here). I make it executable and run the following, which ...
2
votes
3answers
810 views

Cannot add script to init.d

I have installed gerrit on a remote ubuntu server. Now I would like it to automatically start when the server reboots. I am trying to follow this: ...
2
votes
1answer
882 views

VMWare daemon doesn't startup when system starts

I have installed VMware Player on my Debian squueze, but after the reboot the vmware daemon(/etc/init.d/vmware) does not start up automatically, i have tried without any success to set the daemon ...
2
votes
2answers
2k views

hostapd will not start via “service” — but will start directly

I am having trouble getting hostapd to start as a service. It fails when I try to start it: $ sudo service hostapd start [FAIL] Starting advanced IEEE 802.11 management: hostapd failed! From what ...
2
votes
1answer
155 views

how to specify daemon dependency upon another daemon

in /etc/init.d/ first daemon # Provides: first # Required-Start: $remote_fs $syslog second daemon # Provides: second # Required-Start: $remote_fs $syslog first Is this ...
1
vote
1answer
3k views

How to start teamspeak 3 on boot, ubuntu server 12.04

So I'm quite new to linux but I'm starting to understand it. I have a Ubuntu Server 12.04 system, fresh install, and I installed a teamspeak 3 server on it: $ sudo useradd teamspeak (provided user ...
1
vote
3answers
3k views

Difference between /etc/init.d/networking restart and invoke-rc.d networking restart

Is there any real difference between /etc/init.d/networking restart and invoke-rc.d networking restart (Debian)?
1
vote
4answers
2k views

When to mount /tmp (and other temporary directories)

When is the right time to mount /tmp (on Debian)? For /home I would not feel bad just to echo "/dev/foo /home type defaults 0 0" >>/etc/fstab - but can I be sure that /tmp is not used by any ...
1
vote
2answers
318 views

disable init.d script in systemd

I changed the init system from sysvinit to systemd on a raspbian installation. The install boots fine, but now starts lightdm on boot. I don't want it to do that. I noticed lightdm.service is started ...
1
vote
1answer
37 views

What is the difference between rc, rc.local and rc.sysinit?

I tried to display the list of startup scripts for the current runlevel at bootup. I wrote the following code. rl=`runlevel | cut -d " " -f2` ls /etc/rc.d/rc$rl.d/S* | cut -d "/" -f5 sleep 10 It's ...
1
vote
2answers
1k views

How to debug init.d script that isn't being run

I am trying to get god to start during boot on Debian. I added a script to the /etc/init.d/ directory which looks like this. #!/usr/bin/sh ### BEGIN INIT INFO # Provides: god # ...
1
vote
1answer
168 views

Use /etc/init.d/fetchmail with the personnal ~/.fetchmailrc

Now, I have two users in my system using fetchmail with a personal ~/.fetchmailrc and syncing there mails with the command fetchmail -kv --uidl -m '\''/usr/bin/procmail -d %T'\ (In a cron but this ...
1
vote
1answer
966 views

Can I safely disable abrtd on CentOS 6?

There is this nice new daemon called abrtd running on CentOS6. This was inherited from upstream RHEL6. There this can be used (for instance) to automatically generate service-requests. In an ...
1
vote
1answer
453 views

Daemons not starting during the boot on PUIAS (RedHat) 6.4

I am total Linux n00b entrusted with bunch of PUIAS (RedHat) 6.4 servers and desktops. I noticed after rebooting my computing nodes (done just for testing purposes) that many of the daemons which are ...
1
vote
1answer
288 views

Which parameters were used by apt-get to install init scripts for a package?

After removing the init script for hdparm with # update-rc.d hdparm remove, the wish is to re-install/fix/repair the hdparm init script. In other words to undo the update-rc.d removal. Calling # ...
1
vote
1answer
1k views

How to correctly remove mountnfs from /etc/init.d/

Cleaning up the boot process of a Debian squeeze installation running on kernel 3.2.0-0.bpo.3-amd64, I spotted several mountnfs scripts in /etc/init.d/: # ls /etc/init.d/ | grep mountnfs ...
1
vote
1answer
145 views

Create service from command [closed]

I have following command which I try to setup to run on startup: su -l hive -c "nohup hive --service metastore > /var/log/hive/hive.out 2> /var/log/hive/hive.log &" I was thinking about ...
1
vote
1answer
1k views

Make screen start as Daemon for a Minecraft server

I made a script that runs fine manually, but can't get it to run with the description in How to start a script file on boot?. I have run update-rc.d -f minecraft.start defaults This is what my ...
1
vote
2answers
489 views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...
1
vote
1answer
253 views

How to respawn vpnc when it stops?

As root, I've setup a crontab rule that launches vpnc everyday early in the morning (before I arrive at my workplace). But it often occurs that the vpn stopped mid day. As a result, I have to sudo ...
1
vote
1answer
978 views

adding a program on start-up by using LSBInitScripts

I use Debian Lenny (I know lenny is old and other bla bla) and would like to place a program on the start-up. I use update-rc.d by adding an executable file on /etc/init.d. By referring to ...
1
vote
1answer
39 views

Is xfstt necessary?

I am using Lubuntu 11.10. Every time when I shutdown the system I can read on the black screen an error for trying to stop xfstt. I found info about this process here. I have K20xfstt in /etc/rc0.d ...
1
vote
1answer
226 views

For an init.d startup script, what is the ideal user to use as the owner of that process

Everyone says that running processes as root is bad, since it defeats the security and privileges model. But what user should be used to run a startup process? Is it really necessary to create a new ...
1
vote
0answers
8 views

Multiple daemons init script

I have two daemons currently running on my development server (OpenSUSE 12). There are two daemon that work together as a whole and must start together and die together. Is there a standard way to ...
1
vote
0answers
73 views

checking sendmail status as NON root user

I am in the process of converting to CentOS 6.5 from 5.5 and need a way to check if sendmail is on or not. For reasons I don't want to go through, I need to be able to check if sendmail is ON as a ...
1
vote
0answers
63 views

openfire chat server Deamon not getting start while server up every time

we using a Chat server, its installed with openfire, for local office use we installed it, every day morning while server getting ON openfire service is not getting started, I have added it in run ...