Tagged Questions

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

learn more… | top users | synonyms

0
votes
0answers
40 views

autoconf and sysvinit/systemd etc

A constant problem I run into with autoconf is init scripts. The whole point of autoconf is of course portability, and the various init systems (sysvinit, systemd, upstart) - not to mention various ...
1
vote
0answers
11 views

Always try to stop daemon on shutdown without a lock file in /var/lock/subsys/

Normally, if a lockfile doesn't exist in /var/lock/subsys/, rhel doesn't try to stop the daemon, even though a link exists: /etc/rc0.d/K??svcname. There're daemons that are not always started by ...
1
vote
1answer
29 views

Change to rc.local causing hang on tty1

I added a script execution command to my rc.local but forgot to run it in a separate tty. The script has an infinite loop and has hung my tty1. Ctrl-C does not do anything and I don't have another ...
3
votes
1answer
77 views

What does the hyphen mean in chkconfig run level in an /etc/init.d script?

I just have a simple question but scouring the search engines I have not found any explanation of what the - (hyphen) in the chkconfig run level actually stands for within the init script file. For ...
1
vote
1answer
58 views

Is it possible to create a Linux environment without a traditional command shell?

i.e. Using something like IPython, re.pl, or somesuch as a login shell, instead of bash/ksh/etc. Using initscripts, etc. written in Python or some other scripting language, and making no use of ...
2
votes
1answer
47 views

What's the difference between TYPE and DEVICETYPE directives in ifcfg scripts?

While learning the Network Teaming objective of the RHCE (RHEL7) exam I noticed that examples use DEVICETYPE directive in the ifcfg scripts for master and port interfaces. I knew there was TYPE ...
0
votes
1answer
57 views

Init script to run a script as specific user

/apps/data/service/bin/startup.sh This is the script i want to be executed during RHEL booting. I want it to be run in runlevel 3 only. And i want this script to be started as specific user, ...
1
vote
1answer
63 views

Unable to start locally-built ntpd from system service script

I built ntpd from source, which process put it in /usr/local/sbin. Of course, the ntp service points to /usr/sbin. So, I thought I could just change the path in the init.d configuration file like ...
1
vote
2answers
64 views

profile.d on headless server

Is it a bad idea to put variables needed by a daemon program running at boot on a headless system in /etc/profile.d/? From my understanding profile.d doesn't get executed until someone logs into the ...
1
vote
2answers
44 views

Restarting a service from a script

I have a init script - /etc/init.d/myservice, which starts some processes, including a CLI process. And from this CLI process, I am adding a command which can be used to restart the service (restart ...
2
votes
1answer
43 views

Automatically starting smuxi-server

Smuxi (isn't that a weird name?) is an IRC client, which has a decoupled server and client setup. The server sits in some always-on machine in "the cloud" and the client connects to it from a local ...
0
votes
2answers
67 views

rc.local hang on bootup

My rc.local is stuck in an infinite loop since I accidentally put a wrong I/O redirection in and it's executing itself over and over again. I'm on Red Hat 6.5 and would like to know how I can start ...
1
vote
1answer
100 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
279 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
17 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
113 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
250 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 ...
1
vote
1answer
183 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
138 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
37 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
491 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
124 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
31 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
64 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
158 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
102 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
191 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
939 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
47 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
69 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
109 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
48 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
220 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
206 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 ...
5
votes
5answers
549 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
459 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
67 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
4answers
5k 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
3k 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
885 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
1k 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
250 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
1k 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
44 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
1k 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
106 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
656 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
61 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
156 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
97 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 ...