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

learn more… | top users | synonyms

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 ...
0
votes
2answers
316 views

Jboss application startup and shutdown asks for password. How to automate with init script?

Jboss application startup and shutdown of BMC-IDM asks for password (called keystore password, some Java stuff). How to automate with init script? Stop application > stop_idm_suite.sh Suite ...
1
vote
0answers
116 views

Naming process in init scripts

I'm trying to write an init script that will start a service that needs to have started postgresql server before. Bellow is the postgresql's init header: #!/bin/sh # # postgresql This is the init ...
5
votes
1answer
475 views

inittab '-' character in process field

I have a an inittab file with the following entry: console::askfirst:-/bin/ash According to this Man page a '+' character in the process field means init will not do utmp and wtmp accounting ...
2
votes
1answer
211 views

Why does Redhat's daemon function not have a group setting?

Background: I'm a Ubuntu/Debian fan and most of my development experience has been on that platform but my current employer uses Redhat. I needed to write a simple init.d script and want the ...
14
votes
1answer
30k views

How to write startup script for systemd

I have 2 graphics cards on my laptop, one is IGP and another discrete, I've written a shell script to to turn off discrete graphics card. How I can convert it to systemd script, to runt at start-up?
2
votes
2answers
1k views

Can readahead-services be safely disabled?

I am just going through the service-list of a server (CentOS 5) - the question will probably apply to other RedHat, Fedora, ... versions, too. Note that my servers normally run in runlevel 3 (no GUI ...
3
votes
3answers
558 views

How do I determine whether my services are using runit or init?

How do I determine whether my services are using runit or init? I use Ubuntu 10.0.4. Such as nginx, chef, puppet, etc.
11
votes
2answers
9k views

How to make unix service see environment variables?

I have set my environment variable using /etc/profile: export VAR=/home/userhome Then if I do echo $VAR it shows /home/userhome But when I put reference to this variable into the ...
4
votes
2answers
210 views

Is it good practice to create a background job within an init script if the process can not daemonize itself?

I am fairly new to *nix, and have come across the need to drop multiple processes, that should be run 100% of the time. to background using &. I use the following line in an init.d script to do ...
5
votes
2answers
5k views

How to write init.d script log messages to disk?

I'm running Debian wheezy. Many scripts in /etc/init.d/ use various logging functions defined in the Linux Standard Base, like log_success_msg and log_warning_msg. The LSB documentation seems a bit ...
5
votes
3answers
654 views

Aliases for 'sudo /etc/init.d/'

Are there any standards for aliasing sudo /etc/init.d/? I'm sure many people have considered cutting down these 17 characters to just 2 or so.
1
vote
3answers
440 views

Why is bash used in boot scripts?

Why programs run at boot/shutdown are written in bash script? If a compiled language (or a faster interpreted language, like Python) was used, then its running time would be shorter.
2
votes
3answers
4k 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
1answer
693 views

Running script before shutdown seemingly not working

I created a small script backup_files.sh and placed it in /etc/init.d: #/bin/sh logfile=/media/verbatim/log date >> $logfile rsync -av /home/philipp/Documents /media/verbatim/ >> $logfile ...
2
votes
1answer
964 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
1answer
267 views

Bash Script Detects Key Down At Boot

I want to customize my run level scripts based upon a key combo pressed at boot. How to I test for key presses as early as possible from boot? Do I need to do something special, like for example: ...
0
votes
4answers
2k views

add command to /etc/init.d/rc.local file that's missing

Want to add the command sudo mount -t vboxsf H_DRIVE /media/windows7share to /etc/init.d/rc.local file, to run the command every time when system starts up but I don't have such a file (rc.local) ...
1
vote
2answers
4k views

Changing user in a script?

I am trying to change user in order to execute a specific command during startup. It fails silently and apparently the userchange isn't carried out as I can tell that the command isn't executed. What ...
2
votes
1answer
108 views

Gentoo on VM setting IP Manually

I installed Gentoo on Virtualbox with the minimal image. This is the first time I am running gentoo. I need to do ifconfig eth0 192.168.0.10 route add default gw 192.168.0.1 everytime it boots on ...
1
vote
0answers
377 views

Need help to create a Unix shell startup script [closed]

Is there a way to create a Unix shell script (on HP-UX) that will start on server at boot time only, and will execute the following commands in order: # cd /mysql # ./bin/safe_mysqld --user=root ...
5
votes
2answers
707 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 ...
0
votes
3answers
427 views

Prevent init daemon echoing on TTY

Below is an init script which starts/stops a daemon. The daemon is unfortunately printing the parsed packet data (from /home/nuthan/program/server), a socket server written in perl, listening to a ...
4
votes
4answers
1k views

What's the connection between “/etc/init.d” and “/etc/rcX.d” directories in Linux?

I am learning command line from a book called "Linux Command Line and Shell Scripting Bible, Second Edition." The book states this: Some Linux implementations contain a table of processes to start ...
4
votes
1answer
1k views

How to make “notify-send” work from daemon application [duplicate]

Possible Duplicate: Can I launch a graphical program on another user's desktop as root? I wrote a script which starts from init.d .When it finishes I need it to notify-send a message to ...
7
votes
3answers
3k views

Why does initramfs mount the root filesystem read-only

What is the reason for the root filesystem being mounted ro in the initramfs (and in initrd). For example the Gentoo initramfs guide mounts the root filesystem with: mount -o ro /dev/sda1 /mnt/root ...
1
vote
2answers
2k views

Can a service script put inside init.d be called at startup and shutdown?

I'm running Red Hat 5.1. I have a script called sysinit that I added as a service using chkconfig --add sysinit. I have the following set in the file: #chkconfig 4 01 01 This creates one symlink ...
3
votes
3answers
11k views

How to create an unprivileged user in CentOS?

I want to create an unprivileged user to run my RhodeCode server and Celery daemon on a CentOS instance. I think the accepted definition of this is no home directory, login disabled, and no shell ...
0
votes
1answer
619 views

Init Script initializing daemonized process, but won't return [ok]

I'm new to init scripts, but the one I'm using I've copied almost verbatim (I did have to change a few things around from the source I found to work with Fedora). The daemon initializes fastcgi just ...
5
votes
3answers
8k views

How to run a program on boot up?

So I have this program which I manually run as root : sudo gammu-smsd -c /etc/gammu-smsdrc -d What this does is it runs the Gammu (software to manage gsm modems) and 'daemonize' it. My problem is ...
0
votes
2answers
756 views

Detecting monitor on boot time?

I am using my laptop in several monitor configurations that do require xorg.conf (say, I am driving a T221 from my laptop) and it's very inconvenient to manually switch them. Is there something in ...
14
votes
3answers
43k views

How can I make a script in /etc/init.d start at boot?

I think I read something a while back about this, but I can't remember how it's done. Essentially, I have a service in /etc/init.d which I'd like to start automatically at boot time. I remember it ...
3
votes
1answer
396 views

SysV init run levels

On a system that uses SysV init run levels such as Centos 5, when the OS is booting, does it go straight to the run level defined in /etc/inittab? If I change my run level using the init command do ...
3
votes
1answer
5k views

In Debian 6, how to start a daemon as a different user?

I'm trying to start the Tor daemon as another user. When it installs, Tor automatically creates a new user "debian-tor", however, it does not run as this user, but rather as root. In Debain 5 I ...
5
votes
3answers
9k views

Missing init.d/apache2 file

I am new to linux and just recently messed up my first apache/tomcat configuration. After trying to delete apache and tomcat, and now trying to reinstall apache 2, I am missing the init.d/apache2 file ...
2
votes
1answer
124 views

how can 'init' and 'service' command can cross normal-user life?

i'm just moved to linux world in ubuntu 10.10. i'm using it for normal life, internet and social networks, multimedia enterainement like musics and movie, a bit of coding with c and python.. i've ...
10
votes
3answers
29k views

No such file or directory /etc/init.d/functions

I created a startup script to start/restart/stop a group of applications. I used the lib /etc/init.d/functions in my script. It is working well on my system, but it not working for my client; he is ...
4
votes
2answers
334 views

Are certain parts of startup scripts necessary or just good practice?

I'm currently exploring creating a startup script in the form of a system process located in the /etc/init.d/ on my Fedora 14 Linux installation. It sounds like the following two lines are bare ...
3
votes
1answer
205 views

Is there a standard way to configure what policy iptables loads on startup under Debian?

I've just started playing with Debian 6.0 (Squeeze) in a VPS environment, as a way to learn more about system administration. One thing I'd like to configure is a default packet filtering policy. ...
2
votes
1answer
364 views

load program/module at boot

I'm trying to load a program I wrote at boot. The program is also a module.ko and a small bash script. For the module I tried doing depmod mymodule.ko and modprobe -a and messing around with modprob ...
2
votes
1answer
116 views

rc control user

I am playing around with rc scripts. I am starting a daemon from rc.local. I would like to know how I start the process under a specific user instead of root?
10
votes
2answers
549 views

Removing abstraction from Ubuntu boot process

I have been using Linux after almost 5 years and observed that boot process has been almost abstracted. I mean, not much is visible to the user what is going on behind the scenes (Due to splash ...
6
votes
4answers
1k views

Why do I need to hit enter to get my shell prompt after my init.d script completes?

I had to write my own CentOS init.d script for celery because it only ships with one for Debian. You can see the script I wrote when I answered my own stack overflow question 3989656. But there's a ...
3
votes
2answers
2k views

Run daemon on startup in Fedora 13 after wireless interface is up

I want to have radvd (the IPv6 router advertisement daemon) run on startup on Fedora 13. However, the network interface that it will use must be up, otherwise the daemon won't start. If I run the ...
8
votes
4answers
5k views

/etc/rc.d vs /etc/init.d

Is ubuntu's /etc/init.d directory exactly equivalent (functionally) to what I presume to be the more standard /etc/rc.d/ (at least on arch)? Is there any particular reason canonical used init.d ...
7
votes
1answer
333 views

difference between Fedora's, openSUSE's, and Mandriva's initscripts?

I'm trying to figure out how the init system works for these distributions, but they seem to use different layouts... How do each of them work?
2
votes
3answers
1k views

How do I set the group (gid) of a process I'm about to launch?

I'm porting a Debian init.d script to CentOS. In the Debian script, it uses start-stop-daemon for launching the process. The script uses start-stop-daemon's --group flag to change to a different ...
4
votes
5answers
6k views

Create directory in /var/run/ at startup

I'm using apache2 and postgres running on Ubuntu Server 10.04. I have removed the startup scripts for both of these apps and I'm using supervisor to monitor and control them. The problem I have run ...