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

learn more… | top users | synonyms

1
vote
0answers
15 views

Why start script and kill script does not appear in pairs in rcX.d folder?

The scripts need to be executed at boot time was put in the /etc/init.d,and files contained in /etc/rc*.d was the symbolic links point to files in /etc/init.d.Furthermore the names of the symbolic ...
2
votes
1answer
30 views

Writing daemon, /etc/rc.d/init.d/functions hangs

I am writing my own service daemon for Fedora 23 and I stucked, when my script hangs while including source function library. #!/bin/sh # # service-live-text-relation <summary> # # chkconfig: ...
1
vote
0answers
21 views

Execute file at /init before /sbin/init without an initial filesystem

Whenever Linux is booted using an initialramfs/initrd, it executes a file on the temporary filesystem at the path of /init before mounting the real filesystem and executing whatever is specified in ...
0
votes
0answers
48 views

Linux + how to shutdown application properly with reboot or init 0 + init.d scripts

I have Linux Redhat (version 6.5) machine that manages some application before each reboot or init 0 I shutdown the application as the follows: /etc/app-LM.bash /etc/app-UPP.pl /bin/DT-apl.c ...
3
votes
1answer
131 views

unable to install anything using apt-get because of insserv

Whenever I try to install something using apt-get I get the error messages involving insserv. I have tried install many different packages but everything give same error. And apparently, CUPS package ...
2
votes
0answers
31 views

How does one run Multiple parallel Tomcat instances in CentOS 6?

I can install them to different directories, and I think I can make them use different ports, as well. I'm going to add 10000 to each port number for the second installation, and 20000 to the third ...
0
votes
1answer
37 views

Systemd pause boot while script runs

I have a script that I want to run at boot, and whilst it runs I would like it to pause the boot process. I have tried the systemd service [Unit] Description=setup script Before=default.target [...
2
votes
1answer
17 views

Update on reboot with init.d

I created a script to add a bunch of packages and update the system on a fresh install. Here's the relevant part of my init.d script that is giving me trouble: #!/bin/sh ### BEGIN INIT INFO # ...
0
votes
0answers
40 views

Unknown job error on running service

I am getting an 'start: Unknown job: elasticsearch' error when I try to do service elasticsearch start When I run service --status-all I can see elasticsearch present in the list. But I ...
1
vote
1answer
78 views

How can I run my jar file in the background [closed]

I have developed a quick HttpHandler java application (jar file) and I now need it to run. Basically my jar act as a web server and I need it to be running while my linux machine is on. How can I ...
0
votes
1answer
71 views

Configuring Systemd to execute extra script after httpd start/restart using ExecStartPost setting not working

I need to have a PHP file execute whenever the httpd service starts or restarts. I found that Systemd has a configuration setting called **ExecStartPost, which looks perfect for what I need to do. I ...
1
vote
1answer
49 views

start-stop-daemon always returns '0' although the process fails

I am trying to get an init script running that starts nodejs as a daemon. The problem is, that when I executing start-stop-daemon it always returns '0', regardless of what error the nodejs-daemon may ...
0
votes
2answers
35 views

Best way to start multiple “screen” scripts after restart? (centos)

We are using centos. As soon as the server is restarted and the OS is fully loaded, we would like to have a certain user ("foo") start three or four scripts with screen. For example, screen -d -m -S ...
0
votes
0answers
14 views

referencing init script from custom location for Running it as a linux daemon

I am installing a software in a RedHat or SUSE Linux system. The whole software belongs to a specific user. From my basic knowledge on linux systems for installing any script as a linux daemon you ...
0
votes
0answers
41 views

How to add squashfs file to linux live iso with initrd and mount it

I'm looking for a way I can add files to linux live iso that I've built and somehow load them to memory after or before initrd loads and then mount them as tmpfs, Anyone know how to do that? Thanks.
0
votes
1answer
23 views

Running code before initrd has been removed and after the root filesystem has been mounted

I looked here Kernel boot process and I tried to understand how to run a script before initrd filesystem removed and but after the root filesystem has been mounted (EncFS), If I understand it ...
3
votes
1answer
62 views

Trying to create a service but it won't start

Apologies if this is an obvious answer, I am a Windows admin professionally and only use Linux in my homelab to try to learn new things - so I'm very inexperienced with Linux. I am working on writing ...
0
votes
1answer
61 views

Simple manager for systemd

Is there a manager that would run in the console, similar to sysv-rc-conf, that works with the latest systemd under Linux? Ideally it would be able to operate on all runlevels, and be ncurses based.
0
votes
1answer
118 views

Do I need set ulimit for system services, such as nginx.service(systemd)/nginx(sysv)?

I know, when we run application in shell for a large website, we'd better set ulimit for our shell, But most of the service is started by systemd/sysv. Do I need set the ulimit in the service ...
1
vote
1answer
33 views

Busybox ASH inside initrd has a problem when piping tee to sed

I'm trying to log the early boot output from the init script. This is what is working: mkdir -p /run/log && \ mkdir -p /tmp && \ mkfifo /tmp/stage-1-init.log.fifo1 && \ mkfifo ...
1
vote
2answers
162 views

Real world use of suckless's “sinit” init [closed]

I'm trying to set sinit as an init for linux (on a pc..). My goal at moment is simply running a single tty/bash from it. No special mounting is required as the kernel already gets a root=/dev/sda2 for ...
0
votes
0answers
114 views

Bash script is not executing after reboot command Ubuntu 14.04

I've tried using a /etc/init.d/ script, an upstart script, crontab, etc. None of the above are causing the script to execute on boot. The service I am attempting to automatically start on boot is ...
0
votes
3answers
204 views

Startup script needs root permissions

I have a script that I need to run at startup. I have it in init.d. I need to execute one of the commands within the script with root permissions. How do I go about doing this? Edit 1: For reference,...
1
vote
1answer
1k views

Default-Start contains no runlevels

I am trying to make my custom made daemon run at startup and when I call update-rc.d ydcd enable I get the error update-rc.d: using dependency based boot sequencing update-rc.d: error: MyDaemon ...
0
votes
0answers
16 views

inittab entries without runlevels

Refering to here 1 ap::sysinit:/sbin/autopush -f /etc/iu.ap 2 ap::sysinit:/sbin/soconfig -f /etc/sock2path 3 fs::sysinit:/sbin/rcS sysinit >/dev/msglog 2<>/dev/msglog </dev/console 4 is:...
0
votes
1answer
72 views

Execute a init script from C++ program

I have a script in my /etc/init.d/ which executes an application. I am able to start,stop and get status of the service from terminal. Now I would like to start the same service from my C++ program. ...
2
votes
1answer
208 views

Explanation of systemd startup

Raspbian Jessie uses systemd and most system startup processes seem to be run from .service files. There are still a lot of SysV init entries. I gather from reading various articles that Debian 8 has ...
0
votes
0answers
44 views

dracut run hook after root is mounted

I want to run a hook after the root block device is mounted. I'm not sure what I need to do in my module-setup.sh script to get my script to run and run in the right order. I was using the dmsquash-...
0
votes
1answer
383 views

Requiring a script to sync ramdisk before and after reboot

On a specific machine I use a lot of RAM to serve websites really fast directly from RAM (which by the way is working amazingly well). For this I have mounted a ramdisk in /etc/fstab (in debian 7, via ...
1
vote
0answers
195 views

ifplugd(lo): Program execution failed, return value is 1

I have a Raspberry Pi running Raspbian, and I see this error when initializing ifplugd. ifplugd(lo): Program execution failed, return value is 1. From judging the log section, it seems to end where ...
0
votes
1answer
143 views

Init script for a daemon to run screens on CentOS

I have a question concerning a init.d script. Currently I have a init script that launches a custom daemon as follows: sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & ...
3
votes
1answer
230 views

How to debug systemd “init” freeze during boot?

I'm trying to get my own init script running on some ARM hardware and Debian Jessie with systemd. The overall boot concept and init script is almost identical to a x86 variant, which works fine. For ...
0
votes
1answer
239 views

Init Scripts: Do I Need a PID File?

I am new to the the world of init scripts and still a BASH neophyte. I'm currently in a situation where I could use some guidance. We run an application that utilizes JBOSS and I need to be able to ...
1
vote
0answers
102 views

How to have an /etc/xdg/autostart/app.desktop service wait for a (systemd) service?

TLDR: How to have an /etc/xdg/autostart/app.desktop service wait for a systemd service? Long: I have an app started by /etc/xdg/autostart/app.desktop that requires a systemd service to be started ...
0
votes
1answer
76 views

Help with “Required-Stop:” line in System-V type init script LSB header

I wrote a daemon which watches for files in certain directory and if a new file is copied to this directory, then it is committed to SVN. New files appear in this directory only if remote devices copy ...
3
votes
2answers
484 views

systemd: running a script on shutdown after filesystems are mounted read-only

Is there a way to run a script on shutdown, after the file system is remounted as read-only? I've a raspberry pi connected to a wireless socket, which I can control via a sender and a script. I want ...
2
votes
1answer
140 views

Unable to start ZNC as a service

Firstly, this is the exact same question as found here, but the given solutions did not work in my situation. Background I am running a CentOS 6 VPS and I want to run a ZNC bouncer on it. I ...
2
votes
1answer
70 views

Which utility reads LSB headers in System V style init scripts?

Various older Linux distributions, which support System V type init scripts, require one to add LSB header to init script. For example a LSB header from /etc/init.d/sshd from OpenSUSE 11.4: ### BEGIN ...
2
votes
1answer
62 views

Init scripts. Distinction of booting and starting activity

I have some script that runs and shuts down some service placed into /etc/init.d. It has symbolic link into /etc/rc5.d added with chkconfig for autolaunch on booting. Hence it starts on boot and can ...
0
votes
1answer
292 views

lsyncd won't start at startup

My os is mint 17.2 First off, when I start it with: sudo /etc/init.d/lsyncd start it starts. But when I reboot my system it isn't started by default. How do I have it start at boot time? I had ...
1
vote
1answer
29 views

Does metainit have a directive to generate a log file?

Does metainit have a directive to generate a log file by redirecting process's standard output stream to it? The naive way of: Exec: /srv/wordy/wordy >/var/log/wordy.log does not seem to work ...
0
votes
1answer
106 views

Debian 8.1 with Uboot bootloader cannot run FSCK on reboot

I am running Debian 8.1 on an SD card on a Banana PI with U-boot bootloader. I'm trying to force my system to run fsck on reboot, but no matter what I do, nothing happens. Here are what I have tried ...
2
votes
1answer
233 views

Script to run at shutdown

I'm trying to create the equivalent to rc.local that runs last during startup, but to run first during shutdown. I basically copy/pasted /etc/init.d/rc.local as the base template, and updated the ...
10
votes
1answer
376 views

What is the meaning/purpose of *.pid files in /var/run

I'm quite new in Linux world, and now I'm trying to understand FHS principles. In /var/run I found about ten *.pid files like crond.pid which contain just PIDs. There are more than ten processes ...
0
votes
2answers
344 views

Execute simple script before shutdown and reboot

I need to run a very simple script before shutting down or rebooting my VPS running Debian 8,to keep count of network statistics.I tried adding the script directly to /etc/init.d and symlinking it in /...
0
votes
0answers
62 views

Why is chkconfig on SLES 11 sp3 ignoring my # chkconfig: 35 98 01 remark in the start / stop script?

yesterday i was fighting with a pre-made start/stop script of jetty on our sles 11 sp3 linux server. it had that "chkconfig" tags in the upper part of the script is supposed to be used with " ...
0
votes
0answers
56 views

Does an init script always return a proper exit code when running status?

I'm trying to write a cron job script that will check if my services are running and restart them if they aren't so I don't have to do it manually. Now, I've looked up online how to check the status ...
1
vote
1answer
663 views

status_of_proc does not find the process

I am trying to make an init script to work as expected, the start / stop functionalities works flawlessly, but I cannot get the status function to work as expected. I am running : Distributor ID: ...
2
votes
0answers
363 views

How do I put a splash screen during shutdown?

I'm able to put a splash screen on startup. As soon as powered on, a splash screen is shown till startx command is run. I edited the script to put the same image (for now) while rebooting/halting. I ...
5
votes
1answer
2k views

Watchdog daemon doesn't start at boot

I'm using a Raspberry Pi B, with Raspbian. After upgrading to Jessie, watchdog daemon doesn't start at boot anymore. Starting it manually using "sudo service watchdog start" does work. I tried: ...