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

learn more… | top users | synonyms

0
votes
0answers
38 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
31 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 ...
0
votes
1answer
60 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
11 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 ...
0
votes
1answer
24 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
75 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
25 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 ...
0
votes
1answer
73 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
80 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
44 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
74 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
75 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
69 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
41 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 ...
2
votes
0answers
141 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
0answers
74 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
43 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
53 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
85 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
24 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
0answers
57 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 ...
1
vote
1answer
182 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
310 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 contains just pids. There is more than ten process ...
0
votes
2answers
202 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
39 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
35 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
311 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
173 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 ...
1
vote
1answer
706 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: ...
3
votes
1answer
90 views

Where are SSH init scripts located?

I'm following the best security practices of SSH, via this link and the link states: We should remove the unused keys and only generate a large RSA key and an Ed25519 key. Your init scripts may ...
2
votes
1answer
714 views

what is the canonical way to start a daemon in rhel/centos-6 init script?

I found lots of good documentation for ubuntu's start-stop-daemon and there is a man page for a binary daemon. But from what I can tell the canonical way to start a daemon in a rhel/centos script is ...
2
votes
2answers
328 views

Creating a shutdown only script with update-rc.d

I have a Raspberry PI running the standard Raspbian distribution. I have this little C program that I need to run at the very end of the shutdown sequence. All it does is send a couple of logical high ...
1
vote
1answer
95 views

Is it possible to tell what source loaded a Linux kernel module?

In my Linux distribution there are a number of modules loaded during boot up and I'm trying to find where they're loaded from. [root /proc]# lsmod Module Size Used by ...
-1
votes
1answer
305 views

inittab respawn and rc.local

At the moment I have a daemon starting at boot using rc.local by the following line. su -l user -c '/dir/daemon' but I would like to start this process as a service with respawn. I found out that ...
1
vote
2answers
82 views

Is it possible to have bash variables persist between runs

I am trying to create an init script which queries losetup -f for a free loop device. Within the init script I have a start() which queries losetup -f for the free loop device to setup some stuff, and ...
0
votes
1answer
545 views

Creating X11VNC Server Initscript not successful on boot (manually started works)

I have installed X11VNC and starting it on a running System (with X and XFCE running) in a terminal does work. I have written a startup script (used the skeleton in /etc/init.d/skeleton) for that. ...
1
vote
0answers
20 views

Systemd and SysVinit compatibility mode [duplicate]

Trying to reuse an existing "SysV" init script with new Linux version that uses "systemd" (RHEL 7). Just copying it into "/etc/init.d/" fails to work as expected. Can only manually Start/Stop service ...
0
votes
0answers
183 views

noip2 can't update my IP address correctly after computer reboot

I want to set up a server with using no-ip DDNS service. I follow this guide, but it can't update my IP address after reboot the following message is command # noip2 -S 1 noip2 process active. ...
0
votes
0answers
116 views

include Forking - Multi threading in bash script to run it in upstart?

I have lack of understanding. Do i need to include forking in my bash script: http://stackoverflow.com/a/26756839/4749164, so i can use expect daemon/fork - option in upstart? i would like to run my ...
0
votes
2answers
1k views

init.d script not being run on boot

My script is not running on boot in a vagrant box under Ubuntu. My script looks like this - #!/bin/bash # /etc/init.d/mailcatcher ### BEGIN INIT INFO # Provides: scriptname # Required-Start: ...
0
votes
0answers
199 views

Shutdown init script is not executing on immediate reboot on CentOS 7.1

I have installed an init script to run on system shutdown with the following command /sbin/chkconfig --add shutdownExample My shutdownExample(custom script to run at system shutdown) looks like ...
0
votes
1answer
1k views

Run automatically Noip2 when the machine is booted?

I put the following script in /etc/init.d/rc3.d on my Debian 7 but it doesn't work on my computer #! /bin/sh # . /etc/rc.d/init.d/functions # uncomment/modify for your killproc case "$1" ...
0
votes
0answers
312 views

Auto login into router running Busybox

My router runs Linux with embedded Busybox. I'd like to autologin and run a web browser. Here is the /etc/inittab file: # /etc/inittab init(8) configuration for BusyBox # # Copyright (C) 1999-2004 by ...
3
votes
1answer
74 views

Is it good practice to make an init script's lockfile immutable?

I recently created an init script, and decided to set lockfile to immutable to prevent external interference. The only downside I can think of is that if someone wanted to recursively delete ...
0
votes
0answers
40 views

The program called by the init.d works by itself, but not when the init.d itself runs

I currently have two programs, my_sql_auto_update.sh and my_sql_auto_update_initd.sh, the latter is the init.d script located at ~/etc/init.d/ which [should] run the my_sql_auto_update.sh. The ...
0
votes
0answers
177 views

Where is the log_daemon_msg?

So this is my little shscript (my_init_script.sh) located in /etc/init.d/ #!/bin/sh . /lib/lsb/init-functions NAME=my_script_for_auto_update PIDFILE=/var/run/$NAME.pid ...
1
vote
1answer
940 views

atftpd won't start on opensuse tumbleweed under systemd

I tried installing atftpd today. The package installed successfully: # zypper se atftp Loading repository data... Reading installed packages... S | Name | Summary | Type ...
2
votes
1answer
807 views

Installing MongoDB in Ubuntu LXC Container. Fails with 'invoke-rc.d: initscript mongod, action “start” failed.'

I can't manage to install mongodb in a Ubuntu LXC container. I've set-up the Ubuntu 14.10 host by following these instructions: https://linuxcontainers.org/lxc/getting-started/ lxc-create --version ...
0
votes
1answer
204 views

What is wrong with my init.d script [Segmentation fault]

I currently filter out data from a MQTT live stream. I then dump this datum into a csv file named mqtt.csv and the dumping process is done by executor_start_up_job.txt which is written in BASH. I ...
1
vote
2answers
973 views

Debian autossh boot script not working properly

I wrote the start script at the bottom of this question to try to get one of my devices to automatically create several remote forwarded ports with my VPS upon boot. (I've stripped the LSB tags to ...