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

learn more… | top users | synonyms

1
vote
1answer
507 views

How to write a pre-mount startup script?

I want to create a bootup script that runs before the root filesystem / has been mounted as I want to use dm-cache to cache it. The script is supposed to contain cache setup commands. Where would I ...
0
votes
1answer
186 views

Similar method to /etc/init.d

I have set my script to run using the /etc/init.d method. All works good. The problem is that my script does packet capturing and when it restarts the machine after say the crond is loaded then it ...
0
votes
0answers
30 views

Is there something as flexible as crontab for user-level autostarts? [duplicate]

I'm looking for a flexible per-user initialisation tool to kick off user daemons when the system (re-)boots. I suppose something similar to crontab would be great, which works for every user ...
2
votes
1answer
225 views

/etc/init.d/ script starts during loads and crash the system

I have centos 6.4 machine. I created my own script using /etc/init.d/ . Below is the snippet which I took from the net and tried it. The problem now I notice which loading my os when this is loaded it ...
3
votes
2answers
145 views

why do I have two different results if I run a program through terminal(as root) or /etc/init.d(or /etc/rc.local)

Background: I use Debian Lenny on an embedded device uname -a Linux device 3.4.0 #83 Sun May 26 17:07:14 CEST 2013 armv4l GNU/Linux I have a C code (say my_C_program) that calls a board specific ...
1
vote
1answer
868 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
1k views

Change init scripts priority

I'm running a raspbian (based on debian). I want to change the priority of the init services so the very first script which is run by init is one made for me. How can I do it? On runlevel S I have ...
1
vote
1answer
65 views

Init script header not resolving dependency

I need to run a /usr/sbin command in my init script, so there is a dependency for the /usr filesytem to be mounted. To resolve the dependency, I put $local_fs or boot.localfs (I also tried ...
0
votes
1answer
149 views

Init script partially launches java app

I have a java application that I manage to execute by hand. The application normally opens several ports for local communications (7180 => 7183). Port 7182 serves as a web console and allows me to ...
1
vote
1answer
528 views

Need to configure network card manually after each reboot

I am using SUSE Linux Enterprise Server 11 (x86_64) as VM Ware virtual machine (that was cloned). Not sure why but network card cannot be configured via yast2. If I go to edit and hit enter Yast will ...
1
vote
2answers
178 views

Distro agnostic init script dependencies

I'm trying to write an init script which will be able to handle basic dependencies (for example, It has to be started (just) before MySQL service starts). Is there a distro agnostic way to write such ...
1
vote
0answers
395 views

Why does my server not shutdown properly?

When I run $ reboot on my embedded FreeNAS 0.7 (FreeBSD 7.2) it does start the shut down procedure but seemingly hangs. I have registered a command to start a service script which is executed on ...
0
votes
3answers
115 views

Networking starts up but interface has no IP

I have a box that is supposed to run headless. When I boot and manually run /etc/init.d/networking everything starts fine. When I add it to my startup scripts (/etc/rcS.d) as placed by sysv-rc-conf ...
4
votes
1answer
108 views

Displaying all sysvinit init scripts

Is there some tool that displays all available init scripts (on Debian), short of one having to remember a location like /etc/init.d, not to mention that not everything in there is an init script?
1
vote
1answer
653 views

What are the chkconfig directives (classic style) into init.d scripts?

To ask my question, I must first clarify the context. Every init script in /etc/init.d (on RedHat and Centos distros) is prepared to be managed with the chkconfig command-line tool utility. This ...
2
votes
1answer
406 views

“provide net” in gentoo init script doesn't work as I thought

I'm running into a strange (to me) problem. I'm running a gentoo with two net interfaces: enp5s0 (wired interface) and wlan0 (wifi). When I try to run a program, for example openvpn, from its script ...
0
votes
1answer
3k views

Auto-restart an process when it crashes

I have an app that I need to autostart when the OS starts. I am running in a CentOS 6, so I am using a LSB init script placed in /etc/init.d. So far this is fine and working. Now....besides that, ...
3
votes
2answers
13k views

How can I run a shell script as a daemon under Redhat?

I've got a shell script, which is essentially a one liner with some logging, which I'm trying to run this from an init script. I'm using the daemon function inside of /etc/init.d/functions to run it, ...
1
vote
2answers
548 views

davmail systemd launcher on headless server

I'm trying to follow the ArchWiki guide for writing a custom service file to launch DavMail as a system-wide daemon. Previously I had a line in my ~/.xinitrc that read nohup /usr/bin/davmail ...
3
votes
1answer
255 views

Mount /etc from disc into squashfs

I've created a gentoo-live system which should be booted from a CF-card. The whole file-system is in a squashfs. I've created a custom initrd which first mounts the CF-card and from there the squashed ...
2
votes
2answers
800 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 ...
0
votes
1answer
603 views

Converting update-rc.d redis_6379 defaults to chkconfig command

I'm trying to run the commmand below to Centos and of course I get command not found. How do I then convert it to chkconfig ? update-rc.d redis_6379 defaults
6
votes
1answer
3k views

How can I make this daemon/init run as a non root user?

I have an init script to kick off a daemon. The problem is it runs as root. I would like it to run as a user called "deploy". Ubuntu 12.04 #! /bin/sh # File: /etc/init.d/unicorn ### BEGIN INIT ...
2
votes
2answers
2k views

/etc/init.d/script, or /etc/inittab - respawn on die

I have a daemon/service (milter-regex), that is dying. I'm only using it temporarily (A few months), so don't care too much, but I want it to restart when it dies. It is an init.d script. 'service ...
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
251 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
111 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 ...
4
votes
1answer
348 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
202 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 ...
11
votes
1answer
20k 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
808 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 ...
2
votes
3answers
438 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.
8
votes
2answers
6k 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
178 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 ...
4
votes
2answers
4k 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
545 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
419 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.
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
1answer
538 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
874 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
251 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
1k 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
3k 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
102 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
341 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
560 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
382 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 ...
3
votes
2answers
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
2k 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 ...