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

learn more… | top users | synonyms

0
votes
0answers
12 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
0answers
34 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
30 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 ...
0
votes
1answer
55 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
62 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 ...
0
votes
1answer
64 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
58 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
54 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
153 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
40 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
98 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
15 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
66 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
76 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
470 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
88 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
315 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
185 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
58 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
34 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
132 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
380 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
359 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
113 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 ...
0
votes
2answers
487 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 ...
5
votes
3answers
2k views

Running a script during booting/startup; init.d vs cron @reboot

I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system. The use of @reboot (this method was mentioned in this forum ...
1
vote
1answer
116 views

Run a script as root during boot and display in the default linux terminal?

Here's how I configured my kickstart system initialization script (this is a kickstart conf script snippet): ... %post --log=/root/ks-post.log --interpreter /bin/bash cd /root curl --silent ...
1
vote
1answer
100 views

Auto-start multiple background user sessions in Linux Mint

I could use some help with what I think is a basic request on the newest edition of Linux Mint (which I think would also be applicable to Ubuntu). I have a home system with 3GB of RAM and accounts ...
0
votes
1answer
244 views

Run daemon on startup in Debian once openvpn connection established

I am using raspbian. (Debian variant). By default, openvpn is started with /etc/rc2.d/S03openvpn. I set up an /etc/init.d script with a symlink /etc/rc2.d/S04daemonname for a daemon I want to start ...
1
vote
1answer
56 views

Universal .bashrc alias showing results of sysytemctl start command

This is small .bashrc alias that allows me to see results of starting service alias systemctl start apache='systemctl start apache && echo SUCCESS || echo failure' How can i modify to work ...
1
vote
1answer
187 views

Start a service at boot and automatically respawn it if it dies under AIX

I'm trying to write a script that can set a service to: automatically restart after killed automatically start during boot up I can do this by using /etc/inittab but some of the AIX server ...
0
votes
1answer
721 views

Passing variable in init.d script

I have the init.d script show below. I want to start the daemon with the argument --http_root /tv When I start the application without the daemon the argument is accepted However I cannot seem ...
2
votes
0answers
193 views

Convert sysvinit/upstart init scripts to runit

I am trying to migrate a currently VM-based infrastructure to a Docker-based one, using docker-baseimage, which uses runit/runsv to start and supervise system services. Now while it is apparently very ...
2
votes
1answer
2k views

systemd: default value for environment variable

I would like to migrate some OpenRC init script to systemd but I think that it is general problem of environment variables handling in systemd. Original OpenRC files There is a file e.g. ...
1
vote
2answers
109 views

dhcp without dns: ping `hostname` not working. Auto add hostname to /etc/hosts?

On RHEL 6.5 how to make my own hostname locally resolvable, if my ip address is dynamic and not registered in DNS? I know, it's possible to add dhcp hook scripts. Is there a similar way to hook the ...
7
votes
1answer
403 views

Init as a shell script

I was going through a tutorial on setting up a custom initramfs where it states: The only thing that is missing is /init, the executable in the root of the initramfs that is executed by the ...
0
votes
3answers
503 views

I need to run a one line startup script under gnome and systemd

nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 now what is the easiest way to run this one bash line of code at startup??? I am running Gnome 3.14.
2
votes
0answers
61 views

User specific script on login independent of login handler

I am trying to run a script automatically under the following circumstances: A specific user logs in. Independently of how the user is logging in: be it through the shell, a desktop environment ...
1
vote
1answer
139 views

Why does my script does not run in runlevel 0?

I made a script with following LSB header #! /bin/sh ### BEGIN INIT INFO # Provides: updateservice # Required-Start: $local_fs $time $network $named $syslog # Required-Stop: $local_fs ...
0
votes
1answer
1k views

Syncthing daemon starts manually using script, but not at startup

I have installed syncthing on a Linux Mint Debian Edition machine and am trying to get it started at boot time using an init script in /etc/init.d. I followed this tutorial. Symlinks in /etc/rc.* ...
1
vote
2answers
115 views

/init can't find /bin/mount, but find / can?

I have trouble, while booting up a linux machine of mine. During the boot phase, while running the /init script it complains about not being able to find mount. My PATH variable is set to /sbin and ...
2
votes
0answers
106 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
107 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 ...
4
votes
1answer
293 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
66 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
186 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
1k 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, ...
2
votes
1answer
538 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
212 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
110 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 ...