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
2 votes
1 answer
93 views

Where does the normal terminal output go to when a script is started by init.d?

I've a Python script which runs OK manually. I've started it on boot init.d. It runs, but exits. Can you tell me where the normal terminal output goes in this case? There's debug output I've sent to ...
KDM's user avatar
  • 698
1 vote
1 answer
26 views

Using init.d to Start Script Driving Hardware PWM

I'm using init.d to start a Python script on boot. The script employs hardware PWM. When I run the Python manually as the pi user, it works fine. When I start the script manually, calling the daemon ...
KDM's user avatar
  • 698
0 votes
3 answers
1k views

How to run a script (pointing to a python file) with root permission at startup in Raspberry Pi OS?

I am trying to run a script which ultimately runs a pagekite python file. The Pagekite offers tunnelling service for localhost to be publicly accessible. My aim is to run the pagekite.py when the Pi ...
DaSnipeKid's user avatar
2 votes
2 answers
42 views

Is it possible to bulk load code prior to first boot just as ssh can be enabled or wpa_supplicant can be configured?

Knowing that ssh can be enabled with the initial flashing of an SD card (with raspbian) (via touch /boot/ssh) and wireless can be configured (via wpa_supplicant.conf) prior to first boot, is there ...
user3.1415927's user avatar
0 votes
2 answers
581 views

How to pass parameters to program run from init.d?

I'm debugging lirc on a Pi 3b running Stretch with 4.19 kernel. In my previous question, I found a way to cause lircd to function, but it requires invoking the daemon with passed parameters. I ...
tim11g's user avatar
  • 267
1 vote
3 answers
1k views

lirc won't irsend - special command required - why?

I'm using a Pi 3B as an IR transceiver, using the general approach described by this article. I found that Raspbian kernel 4.19 and beyond have changed lirc. I followed the guidance in this article ...
tim11g's user avatar
  • 267
-1 votes
3 answers
189 views

How to automatically run a script on boot / startup?

I have trying to get a script to run at startup to mount a flash drive and change ownership on dynamically created files. I have not been successful in getting the script to run. It only runs when I ...
Eric Lieber's user avatar
0 votes
1 answer
3k views

Starting Real VNC daemon automatically with a boot or reboot

I can use sudo vncserver-x11-serviced & to start a VNC Server as a daemon. I need to execute this command whenever I boot or reboot Raspberry Pi. From https://www.realvnc.com/en/connect/docs/...
prosseek's user avatar
  • 121
1 vote
1 answer
531 views

Run forever task as root in init.d script on startup

I'm trying to start a nodeJS Server on Raspbian on startup. Everything works fine with this script: #!/bin/sh #/etc/init.d/myService ### BEGIN INIT INFO # Provides: myService # Required-...
FabZbi's user avatar
  • 115
0 votes
0 answers
292 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 ...
Eugene B's user avatar
1 vote
1 answer
2k 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;...
kapcom01's user avatar
  • 149
7 votes
2 answers
5k 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 ...
Adnan Farooqui's user avatar
0 votes
2 answers
471 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 ...
Ronthebear's user avatar
1 vote
1 answer
1k 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 ...
Robert Hume's user avatar
0 votes
1 answer
1k 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 # ...
Nick Dewitte's user avatar
5 votes
1 answer
2k 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 ...
Radu's user avatar
  • 480
2 votes
0 answers
213 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 ...
lolok's user avatar
  • 21
1 vote
1 answer
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. ### ...
hossein valizadeh's user avatar
4 votes
1 answer
14k 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 ...
chase's user avatar
  • 141
2 votes
0 answers
260 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 ...
twinlakes's user avatar
  • 219
4 votes
1 answer
13k 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 ...
franck's user avatar
  • 143
5 votes
1 answer
30k 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=...
Markus Weninger's user avatar
1 vote
0 answers
2k 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 ...
Question Asker's user avatar
1 vote
1 answer
2k 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: ...
Michael Gierer's user avatar
0 votes
1 answer
405 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 ...
SebasZil's user avatar
  • 175
1 vote
1 answer
1k 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 ...
pierce.jason's user avatar
3 votes
1 answer
2k 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 ...
Nikki Locke's user avatar
5 votes
1 answer
5k 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. ...
Adi's user avatar
  • 151
1 vote
1 answer
878 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 ...
user379468's user avatar
1 vote
3 answers
3k 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. ...
ThomasD's user avatar
  • 39
3 votes
2 answers
14k 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: $...
Ric Steinberger's user avatar
3 votes
3 answers
1k 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 ...
EDP's user avatar
  • 1,681
0 votes
2 answers
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-...
Nos's user avatar
  • 21
0 votes
1 answer
3k 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-...
ceremcem's user avatar
  • 287
2 votes
0 answers
1k 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 ...
Matt Gaunt's user avatar
0 votes
1 answer
552 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 ...
ezgoodnight's user avatar
2 votes
1 answer
357 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 ...
Farzad Ahmadpour's user avatar
3 votes
1 answer
213 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 ...
helm's user avatar
  • 133
1 vote
0 answers
773 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 ...
dgrat's user avatar
  • 223
3 votes
4 answers
25k 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 ...
alexus's user avatar
  • 327
3 votes
2 answers
7k 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 ...
Antero Duarte's user avatar
4 votes
2 answers
3k 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 ...
ose's user avatar
  • 193
3 votes
2 answers
3k 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 ...
Martin Pecka's user avatar
1 vote
0 answers
703 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 ...
cwd's user avatar
  • 318
3 votes
2 answers
17k 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 ...
Nick Jonas's user avatar
1 vote
1 answer
192 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/...
Janghou's user avatar
  • 1,426
3 votes
1 answer
2k 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 ...
vasco's user avatar
  • 161
1 vote
3 answers
15k 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/...
Essi Shams's user avatar
3 votes
1 answer
12k 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 ...
shiznatix's user avatar
  • 131
2 votes
3 answers
8k 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 ...
Someone1234's user avatar