Questions tagged [init.d]

Use "init.d" tag for matters related to scripts run during start-up (and shut-down) by the init process - typically they will start daemons or configure pieces of hardware. As of Raspbian Jessie, the default init system is systemd, but other systems such as Upstart and SysVinit exist for other distributions available on the Pi.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Busybox init, is it possible to delay execution of init.d script conditionally?

I would like to boot into a python app. My python app has the excellent pigpiod daemon as a prerequisite. I am using Busybox init process. I have a pigpiod launch script /etc/init.d/SXpigpiod and my ...
1
vote
1answer
25 views

init.d script does not run start on boot but starts manually (Raspbian)

Whenever the system starts, the zfs-import init script does not run: root@kapnet:# /etc/init.d/zfs-import status ● zfs-import.service - LSB: Import ZFS pools Loaded: loaded (/etc/init.d/zfs-import;...
3
votes
2answers
475 views

I want to run a Python 3 script on startup and in an endless loop on my Raspberry Pi

I have created a smart vending machine using my Raspberry Pi. For now, I open the Raspberry Pi using SSH and run the script manually for every transaction. I want to automate the process and run the ...
0
votes
2answers
57 views

Trouble getting picam to take a photo on boot (init..d method)

I want the camera on my pi (Rpi 3B+) to take a picture every time it boots up. I've read through several other questions of people trying to do similar things, but I haven't ever found the script that ...
1
vote
1answer
698 views

“service restart” working although init.d script doesn't support “restart”

I wrote the following script /etc/init.d/tomcat in order to manage my manually-installed Apache Tomcat server as a service: #!/bin/sh # # /etc/init.d/tomcat -- startup script for the Tomcat servlet ...
0
votes
1answer
95 views

My script in init.d fails on boot, fails as a service, but works fine when executed manually

I created the following script in /etc/init.d/bootscript.sh The script has these permissions: -rwxr-xr-x 1 root root 855 Aug 1 22:44 bootscript.sh # /etc/init.d/bootscript.sh ### BEGIN INIT INFO # ...
4
votes
1answer
1k views

Clarification about the boot process (systemd / init)

I started disabling some services from systemd to speed up the boot time, but I noticed that many services are also in the old init (which runs). There are quite a few things that start in rc.d (or at ...
2
votes
0answers
134 views

Deluge Web and init.d Issues

I'm having trouble getting Deluge Web to work. I'm a bit of a noob, so bare with me. My Pi is set to automatically connect to my VPN provider and run Deluge on boot. The problem is, I want to have ...
1
vote
1answer
5k views

boot time start up code on Raspberry pi 3 jessie by adding script under init.d

to run a script at start-up on my Raspberry pi 3 board ( with jessie lite ) : 1- I added one init script under /etc/init.d/ directory. I can start,stop,restart service using script manually. ### ...
1
vote
1answer
7k views

Getting to display images with feh at startup

I can't get my raspberry pi to display images using feh at startup. I have tried placing my simple feh command wrapped in a shell in cron jobs, /etc/rc0-9.d, and init.d but nothing is working. I ...
0
votes
1answer
167 views

Run program from inittab, can´t get return´s from scripts

I am just working on a QT GUI program which is the only program executed on a minimal system build by buildroot for a RaspberryPi Compute Module. But I think this should not matter. My problem is ...
2
votes
0answers
248 views

How to write service on Jessie [closed]

I would like to write a service with the standard start, stop, restart, status interface and that runs on startup and restarts if killed. However, in researching solutions, I've discovered that there ...
2
votes
1answer
6k views

How to disable OpenVPN from running at startup on Raspbian?

I'm trying to disable OpenVPN from running at startup. I tried changed the setting for AUTOSTART in /etc/default/openvpn from all to none, but that didn't work. How do I disable OpenVPN from running ...
4
votes
1answer
11k views

Raspbian Jessie: What do “service --status-all” and “systemctl list-units --type=service” show?

So, I read a lot about init systems in the last two hours, since this topic was completely new to me. I now know that Raspbian Jessie uses SystemD. I also found out that systemctl list-units --type=...
1
vote
0answers
1k views

Start NGINX Server at Login?

I have an NGINX server (used for RTMP) installed on a Raspberry Pi3 running the latest version of Raspbian (as of this writing). I would like to have the NGINX server start automatically when the Pi ...
1
vote
1answer
977 views

Trying to start a script at startup

I'm trying to write a script which starts a program with some parameters at startup (after boot) and therefore I'm using /etc/init.d. This is my script: #!/bin/bash ### BEGIN INIT INFO # Provides: ...
0
votes
1answer
216 views

How to kill startup script?

I just added a script to send me my ip-address of my pi via email as soon as it starts. Something went terrible wrong with it. On each boot I get a A start job is running for LSB: Raise network ...
1
vote
1answer
823 views

How does Raspbian Jessie set the hostname during system startup?

Most systems seem to read the contents of /etc/hostname and make a call to /bin/hostname during the system startup from an init.d (or similar) script. Raspbian Jessie appears to have a different way ...
3
votes
1answer
1k views

How to write an init script

I am developing an automatic watering system on my Pi. The code is C#, run under Mono. I want the system to start automatically when the Pi boots up, so I am trying to create a script in init.d. I ...
5
votes
1answer
3k views

How to find out the default init system of my raspbian?

I want to write a script to enable my program on boot automatically. This can be done using SysV Init, Upstart or systemd. However, I am not able to figure out which init system my Raspbian uses. ...
1
vote
1answer
700 views

Why cant I get forever to run on my Raspberry Pi 2 (node 0.10.2

I've installed node 0.10.2 and forever on my raspberry pi. I had to update npm in order to install forever. I've created the following bash script to run my node app, but when I run it, it just prints ...
1
vote
3answers
2k views

Can't stop script from running at start up

Hope this is the correct forum. I'm new to Raspberry Pi and programming. I have been trying to get my script running at startup without any success, until I found an answer on stack overflow. ...
3
votes
2answers
10k views

/etc/init/d/tightvncserver script fails at boot

This is the tightvncserver init.d script, tightvncserver, in /etc/init.d: ============ ### BEGIN INIT INFO # Provides: tightvncserver # Required-Start: $remote_fs $syslog # Required-Stop: $...
3
votes
3answers
664 views

When to call script that can capture IP in python

I'm trying to show my local IP on an LCD during startup. My script worked fine during normal testing via the command line, but when called at startup it doesn't seem to be able to fetch the IP. I ...
0
votes
2answers
3k views

Cannot get Synergy to start with Raspbian

I've tried multiple ways to get it to work, https://learn.adafruit.com/synergy-on-raspberry-pi/setup-synergy-client-autostart https://www.rootusers.com/compiling-synergy-from-source-on-the-raspberry-...
0
votes
1answer
2k views

boot script is not called on boot

I have the following script named /etc/init.d/asplashscreen: #! /bin/sh ### BEGIN INIT INFO # Provides: asplashscreen # Required-Start: # Required-Stop: # Should-Start: # Default-...
2
votes
0answers
997 views

Get an init.d script to wait for internet? [closed]

I've got an init.d script that starts on boot and all it does it run a shell script. The script, tries to update a github repo before running the server, the idea being, on a reboot everything ...
0
votes
1answer
409 views

Why won't `gpio` work from an init script?

I have an init.d script that successfully runs scripts to an LED board from Adafruit using this software: https://github.com/hzeller/rpi-rgb-led-matrix In addition, I've set up a simple single LED ...
2
votes
1answer
243 views

Latency variation

I have a problem using my raspberry pi 2 for applications that need low latency. I wrote a c++ GPIO routine that reads a high resolution quadrature ttl encoder. It then updates a counter and adds it ...
3
votes
1answer
194 views

init.d possibly caught in loop

I put the script "myscript.sh" with the following content into init.d: #!/bin/bash while : do raspistill -v --width 1920 --height 1440 --quality 10 -t 1000 -o /home/pi/webcam/current.jpg ...
0
votes
0answers
573 views

udhcpd init.d script makes trouble using RPi as WiFi AP

I wrote an udhcpd init script. It is more or less like the standard script, which also made trouble. However it supports at least a status output. The problem is that it does not start automatically ...
2
votes
3answers
12k views

Raspbian wpa_supplicant fails, which service to (re)start?

I'm using Raspberry Pi 2 installed with Raspbian (Debian Wheezy) ~ Release date: 2015-02-16. Every now and then wpa_supplicant dies on me and usually when I'm remote and I cannot do anything other ...
3
votes
2answers
6k views

Stuck in boot after trying to work with init.d script to run at boot

I messed up the boot on a raspberry pi that is meant to run an important project. It started when I was trying to get a script to run at boot. I tried creating a daemon and I successfully started and ...
3
votes
2answers
2k views

Disable Raspi-Config

I am able to view the output of the boot sequence of the RPi, however, I have no USB keyboard and so cannot get past the raspi-config screen. I also do not have a router, I have only a link-local ...
3
votes
2answers
2k views

How to run the NTP daemon automatically?

On my RaspBMC, the time drifts pretty much (more than a day in one month). So I started to use NTP, but have problems running it. I called sudo update-rc.d ntp enable, I also added DAEMONS=(!hwclock ...
1
vote
0answers
595 views

How can I get my init.d script to be the last startup item on runlevel 4?

After reading a lot of other questions regarding kiosk mode, I'm using matchbox window manager to launch chromium on my pi that is booting raspbian. I'm started using an older script that was ...
2
votes
2answers
14k views

Access denied when starting systemd service

Noob question, but hopefully someone can help me out here. I'm transitioning from init.d to systemd on my RPi running Linux, as I'm told it would cut my boot time in half. My init script requires ...
1
vote
1answer
176 views

How do I run a script (that needs WIFI) on shutdown before WIFI is down

I have a script on the PI to shutdown my NAS "shutdown_nas.sh". I have created that script in /etc/init.d according to the instructions in /etc/init.d/README It is symlinked in /etc/rc0.d/...
2
votes
1answer
1k views

Redirecting stdout and stderr to UART

I am building my own cross-linux-from-scratch (CLFS) system for Raspberry Pi. I already build whole system, I prepared SD card and now I try to boot. I am redirecting all kernel output to serial ...
1
vote
3answers
11k views

Using init.d script to start my python program on startup

I have a python script that I would like to be run at startup. I have made a init.d script as follows: #! /bin/sh case "$1" in start) echo "starting pitracker" su 'pi' -c 'python3 /home/...
2
votes
1answer
11k views

Run python-flask server from daemon

I have a python script that uses Flask to run a web server on my Raspberry Pi. This script is working just fine when run from the command line directly but I would love for it to start in the ...
2
votes
3answers
7k views

Deluge have no init scripts?

Deluge have no init scripts in raspberry pi repository? root@rpi ~# service deluged start deluged: unrecognized service root@rpi ~# service deluge-web deluge-web: unrecognized service But deluged ...
4
votes
2answers
939 views

SMSC95XX Ethernet Load Time

So I have a custom minimal kernel I have created which boots fine on the RPI. I'm using busybox for my init process. However I am having some trouble with the ethernet port. (This is on the model B ...
9
votes
6answers
26k views

Oops I need runlevel 1

So I have a bug in a script in my init.d directory and bottom line...I can't completely boot the pi. How can I boot into runlevel 1 (single user mode) so I can fix the bug?
2
votes
1answer
5k views

Init after everything is up?

I have a service I start/stop on boot/shutdown which I'm using to help me keep track of what I'm doing while experimenting with distributions on my RPi and swapping SD cards all the time. The problem ...