The scripts to be executed at boot, usually for starting deamons and mounting file systems.

learn more… | top users | synonyms

0
votes
1answer
13 views

rc.local hang on bootup

My rc.local is stuck in an infinite loop since I accidentally put a wrong io redirection in and it is executing itself over and over again. I am on red hat 6.5 and would like to know how I can start ...
1
vote
1answer
18 views

Kernel logs on power failure

I was wondering if it was possible to have a logging program document a random power failure. Clearly it won't have any time to log when the power fails, but is there a way to recognize a power ...
1
vote
1answer
43 views

How can I kill child processes with start-stop-daemon?

I'm writing a simple web server using nc and bash. It looks like this: #!/bin/bash rm -f /var/run/streamman/out mkfifo /var/run/streamman/out trap "rm -f /var/run/streamman/out" EXIT while true do ...
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 ...
2
votes
1answer
33 views

How can this init script start without its dependency?

I'm working on some lsb init scripts. Here's the init info from one of them: ### BEGIN INIT INFO # Provides: myscript # Required-Start: networking myotherscript # Required-Stop: networking ...
3
votes
1answer
24 views

Install init scripts manually under Debian Wheezy

I played around with LSB-compatible init-scripts under Debian Wheezy (init is from sysvinit package version 2.88dsf-41+deb7u1). My script in the /etc/init.d directory is as follows: root@T60:~# ls -l ...
3
votes
1answer
27 views

start-stop-daemon returning always 0 (success)

I have set up start-stop-daemon to start my script automatically case "$1" in start) log_begin_msg "starting foo" start-stop-daemon --start --chuid nobody --user nobody --pidfile \ ...
1
vote
1answer
29 views

If a start-up script in `init.d` has standard output, where is that logged if anywhere?

We have a startup script that is symbolicly linked to /etc/rc0.d/K01ourapp. Apparently, it is not working as expected during shutdown. The script actually does a few echo calls that may help in ...
1
vote
0answers
17 views

Where sysv-rc-conf gets information about daemons?

Recently I deleted an init-script of my program both from filesystem and with update-rc.d: update-rc.d foobar remove But sysv-rc-conf still lists it, though I can't see links in /etc/rc* ...
3
votes
1answer
92 views

Minimal Linux with kernel and BusyBox: /etc/inittab is ignored, only /init is executed

I managed to create a small and fully functional live Linux CD which contains only kernel (compiled with default options) and BusyBox (compiled with default options + static, all applets present, ...
0
votes
0answers
30 views

Ubuntu Trusty Preseed Error

I have a preseed file that installs Trusty but the install is giving me this error: Jul 22 17:52:42 in-target: Setting up sysv-rc (2.88dsf-41+deb7u1) ... Jul 22 17:52:42 in-target: info: Reordering ...
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 ...
3
votes
1answer
50 views

Grepping a variable

I've written a simple init script to start and stop a Python script as a service. I have to be explicit about the version of Python I'm running, because this is on a CentOS 5 box with Python 2.4 & ...
2
votes
2answers
57 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 ...
3
votes
1answer
43 views

Process management and pkill

I've been studying process management using shell scripts and I'm starting to realise how difficult it is to make sure that it's done right. For example, you can record the PID of a program to a ...
1
vote
1answer
36 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 ...
0
votes
2answers
140 views

how to create php-fastcgi.sock for Nginx

I've installed Debian Wheezy and downgraded php5.4 to php5.3, and wanted to use fastCgi instead of php-fpm since it is not included in php5.3 package. now I run into a little issue and can't seem to ...
0
votes
0answers
44 views

Can not call a command

I have a script /etc/init.d/tilestream with: TILESTREAM="/usr/bin/tilestream" MAPPATH="/data" HOST="host" #HOST="localhost" #UIPORT="9001" UIPORT="8888" #TILEPORT="9000" TILEPORT="8888" ...
2
votes
0answers
38 views

Matterhorn dead but PID file exists

Installed opencast-matterhorn14 in a Centos 6.5 Machine and after Installation steps while I try to run the Matterhorn using service matterhorn start I keep on getting the same error: ...
0
votes
1answer
33 views

Should “invoke-rc.d” or “service” be used to restart services?

I'm confused as to which is best and in which circumstances: invoke-rc.d apache2 restart or service apache2 restart Is there a real difference? man service has the following interesting bit: ...
0
votes
1answer
40 views

init.d script won't send graphical data

I have a client sever java program. The client's work is to capture the screen and send data to server. An additional function it does is opens the website given from server and send some text to ...
1
vote
2answers
76 views

/etc/init.d permissions issue

We are trying to harden our Linux Redhat 5 servers and one of the findings is for the /etc/init.d. The security finding is requiring that we chmod it to 700 or more restrictive. Please see the ...
4
votes
1answer
115 views

BASH_ENV and cron jobs

I have several questions related to non-interactive, non-login shells and cron jobs. Q1. I have read that non-interactive, non-login shells only "load" $BASH_ENV. What does this exactly mean? Does ...
6
votes
5answers
380 views

Removing unused init scripts

On my Debian server, I have no network shares (NFS, SMB, ...). I am trying to optimize and simplify my boot process. Is it OK to remove the following init scripts? /etc/rcS.d/S12mountnfs.sh ...
2
votes
1answer
217 views

Migrate socat init script to systemd

I use socat with following init script on debian 7.2 with sysVinit. It works perfectly: #!/bin/bash DESC=socat DAEMON=/usr/bin/socat LIB=/usr/lib/socat SOCAT_ARGS="-d -d -lf /var/log/socat.log" [ ! ...
4
votes
2answers
63 views

What's the recommended way to run a service as a non-root user?

I have a simple init.d script which starts and stops a process. I call the init.d as root, but I'd like the process it controls to run as a specific user. The most common suggestion online seems to ...
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
2k views

Upstart documentation for CentOS 6

I am currently migrating from CentOS 5.5 to 6.4. Having fun converting /etc/inittab stuff to upstart. Ran into a lot of little problems but am getting the hang of it now. The best documentation ...
4
votes
2answers
477 views

Why pidof and pgrep are behaving differently?

I have a init script in /etc/init.d/myservice for initialize a service like this: ... start() { ... daemon /usr/sbin/myservice ... } stop() { ... pgrep myservice pidof myservice ps -ef ...
18
votes
1answer
908 views

What sets systemd apart from other init systems?

It is not quite official but it looks like systemd is coming to Debian and after reading some of the heated mailing list discussion on that decision, I am curious about the polarizing nature of ...
4
votes
3answers
140 views

Why doesn't rc.local run entirely

Here is my rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # ...
1
vote
2answers
483 views

An init-script does not get called on shutdown

I have set up an init-script to control the state of a VirtualBox VM: #!/bin/sh #chkconfig: 35 99 5 #description: vTiger virtual machine ### BEGIN INIT INFO # Provides: vtigervm # Required-Start: ...
3
votes
3answers
41 views

possibilty of running deamons with under privilaged users while bootup

I have authoritative DNS daemon in my test DNS setup. which is responsible to provide host IP at best choice. Anyway this daemon/process can run by setting some capabilities using setcap and then a ...
1
vote
1answer
296 views

How to make some initscript start after delay at boot?

I want to run a thing that may disrupt the system (or remote access to it) if something goes wrong (for example, misconfiguration). To reduce problems I want to have a "grace period" after the system ...
2
votes
2answers
84 views

LFSH … what is '/lib/init' for?

I'm trying to understand the init/boot process. My system is LMDE, so I presume it will be pretty much standard Debian in that regard. I believe I more or less understand the basics of the init ...
1
vote
1answer
441 views

Linux Mint: How to enble cryptswap with custom password?

When you want to use hibernation and you care for security, you'd like to have the swap encrypted. But not with the random password, chosen for you at startup, but with a fixed one, supplied by you at ...
0
votes
2answers
58 views

Run a single command at the start of the machine

Most unix servers do have services defined as init scripts, on linux in: /etc/init.d and on hp-ux in: /sbin/init.d. However, what if I just want a single command to be executed when machine boots? I ...
2
votes
1answer
132 views

local shutdown scripts (do's and don't's)

At work, I'm running linux, and use vagrant on a daily basis. What I find annoying is that the system often hangs when I reboot/shut down, if I forgot to vagrant halt any virtual boxes I may have ...
-3
votes
1answer
81 views

where is this HOME environment variable and what do I have to add -H too it?

I recently attempted to run a boot up script which failed I didn't know why it failed so I posted a question about that here. chkconfig bootup script failing, script runs good manually Where the ...
2
votes
1answer
811 views

chkconfig bootup script failing, script runs good manually

I recently purchased a vps and I attempted to create a startup/restart script to start up my java program. I am running CentOS 6. The script works if I execute it manually with this command: ...
2
votes
1answer
122 views

Why is the restart inittab action asking me for an id?

I am following the NAND firmware update tutorial to try to get my system to run from RAM so I can flash it. I previously had my script running but for some reason unknown to me it is giving me: INIT: ...
4
votes
1answer
99 views

bash_completion for initscripts

I have writen my own initscript /etc/init.d/myscript. I can start and stop my script with the service command service myscript start service myscript stop When I type service <TAB>, ...
2
votes
1answer
585 views

How to properly use Gentoo Linux as a supplement to an existing distribution?

While I originally wanted to entirely replace the Linux distribution my NAS uses, I meanwhile came to the conclusion that it would be better to leave the existing system as unmodified as possible and ...
3
votes
2answers
163 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 ...
2
votes
1answer
683 views

Sabayon - mysql (and other services) won't start

It's a fresh install of Sabayon Linux. I installed mysql (equo install dev-db/mysql), configured it (emerge --config ...), but it doesn't start using /etc/init.d script: # /etc/init.d/mysql start * ...
1
vote
1answer
442 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 ...
0
votes
1answer
61 views

Why env variable are not visible while starting a service

I am wondering why during service start up environment variables are not visible. To be more precise: I created service startup scrip according to LSB spec which starts some java process. For this ...
2
votes
2answers
3k views

How to make a script run at boot time in Debian Wheezy?

I am writing a script to do some tasks at boot up time in my Debian Wheezy AWS EC2 AMI. Sources on the internet say that usual way to do this is to use update-rc.d to install the symlinks needed to ...
3
votes
1answer
457 views

How to trick an init script into returning 0

I have a init script which is poorly designed because it does not conform to the Linux Standard Base Specifications The following should have an exit code of 0 if running, and 3 if not running ...
0
votes
2answers
74 views

Run level script - Help

I want the following command to be ran, as soon as system boots. glances -s -P redhat & How to achieve that? I tried writing a run level script which didn't work as expected.