Questions tagged [init-script]

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

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

systemd, journalctl, and suspend/resume (sleep/wake): marked by default in the logs? Or how to add? And scripting around suspend/resume in general?

( First of all, I'm not completely sure what the official terms are. I think it's "suspend"/"resume", with "sleep"/"wake" being synonyms (and I'm not sure if ...
dwawlyn's user avatar
  • 23
0 votes
1 answer
130 views

Stop not called for init rc.d service

I have a very simple SysVinit service in /etc/rc.d: #!/bin/bash PIDFILE="/var/run/test.pid" status() { if [ -f "$PIDFILE" ]; then echo 'Service running' return 1 fi ...
Maestro's user avatar
  • 179
0 votes
1 answer
45 views

How to execute wine command through busbox?

I am building minimal operating system using busybox.I am writing init file, I want to call script1.sh file from init file. Challenges I am facing are: After running init file it is showing ./script1....
Abhishek Borse's user avatar
0 votes
1 answer
108 views

How to integrate C program with init file?

So I am working on building minimal os using busybox. What I want is I want to run my .net program from BIOS. But I am not sure linux will run .net program or not, so to clear my path I am using C ...
Abhishek Borse's user avatar
0 votes
0 answers
85 views

kernel ignores append init=/bin/bash

qemu-system-x86_64 -m 2G -accel kvm -kernel kernel6.1 -append "init=/bin/bash" -initrd myinitrd.gz Supposed to run bash as init, but kernel still prints: [ 1.400577] Run /init as init ...
exebook's user avatar
  • 194
0 votes
1 answer
460 views

why does application not start with systemd script

I would like to executea script as root whenever I boot the system. I wrote a shell script: # cat /home/root/demo_wrap.sh #!/bin/bash `/home/root/demo_start.sh` > /dev/null & that works great ...
mistyron's user avatar
0 votes
0 answers
50 views

Issue booting HelloSystem 0.7.0 - Base FreeBSD 13

There is an issue in the release of HelloSystem 0.7.0 with FreeBSD 13 (Even using the version 0.8 over FREEBSD 14) version. In the booting process the system stuck and do not load the script “init”, ...
Hernan Sanchez's user avatar
1 vote
1 answer
81 views

Bash script error on boot

I have to tune my laptop's keyboard behaviour by lowering its brightness timeout, so I placed a one-line command in a script file, executed at boot. Here is it: $ cat /usr/local/bin/boot-script.sh #!/...
mattia.b89's user avatar
  • 3,143
0 votes
0 answers
66 views

How to reboot my linux multiple times and store my dmesg log at each boot?

I'm using beaglebone board, I just want to measure its boot time multiple times, so for that, I'm thinking to implement one script which reboots after every boot and stores dmesg data. Can anyone give ...
subbu Subhash's user avatar
1 vote
0 answers
154 views

whoami command fails after running /bin/su

I have a system with an init script that launches multiple applications, each under it's right user and group. The init script checks the home directory of each user and looks for the application init ...
user2234234's user avatar
0 votes
1 answer
799 views

Why does this init.d script sometimes not run at shutdown?

I'm on Debian 10 Buster. I can't figure out what's wrong with this init.d script? Sometimes it doesn't run at server shutdown. My MySQL error_log fills up with "Status information" when the ...
Jeff's user avatar
  • 776
1 vote
1 answer
18 views

How to schedule a period of time in which power-on or log-in is prevented?

So you may get a better idea of the context, this idea comes from the specific problematic of "letting kids being progressively responsible of their own devices". So I was wondering if there ...
Etsaf's user avatar
  • 123
7 votes
2 answers
4k views

syslog message at boot: uninitialized urandom read

CPU is AMD GX-412TC SOC: GX-412TC GE412TIYJ44JB 4 6W 2MB 1.0GHz/ 1.4GHz N/A N/A DDR-1333 0-90°C which does not have rdrand: grep rdrand /proc/cpuinfo # nothing I see following messages in my syslog ...
Martin Vegter's user avatar
0 votes
0 answers
78 views

How to perform a hot repair of a functioning, but limping rootfs with the switch_root command and a blank partition?

I have an extreme edge case that I may never see again, but I'd like to be prepared. I have an embedded system (u-boot) whose primary disk has 4 partitions. One of the partitions is the rootfs (ext4) ...
Liam Kelly's user avatar
0 votes
1 answer
229 views

ftp fails in AIX startup

I have a script in AIX that runs a ftp to make a FTPS connection to another host running vsftpd server. /usr/bin/ftp -snv host 8081 <<END_SCRIPT debug user anonymous pass passive binary debug ...
Fazlin's user avatar
  • 281
5 votes
2 answers
14k views

Running a sudo command automatically on startup

In order to adjust the screenpad backlight on my ASUS Zenbook, I am using a kernel module I found here. Per his instructions, to make keybind shortcuts using a simple screenpad x command to adjust the ...
PUNJISTICK's user avatar
1 vote
0 answers
1k views

HiveOS: Script (which if invoked manually via console works) doesn't start on boot when I inserted it to /home/user/initx.user.sh

I use a mining rig running HiveOS, which I believe is based on Ubuntu. I made a script called amdtimings.sh which inserts custom HBM2 timings to my GPUs via the use of a tool called amdmemorytweak. ...
papajo's user avatar
  • 119
0 votes
1 answer
542 views

CentOS: Add init script to all default runlevels

How can I add specific init script exists in /etc/init.d/init_script to all default runlevels? In debian based distros, this can be achieved by sudo update-rc.d init_script defaults But in CentOS, ...
Eng7's user avatar
  • 1,681
2 votes
1 answer
3k views

Nessus 8.13 Install on Kali or Ubuntu: /etc/init.d/nessusd: command not found

I really need some help with this issue I am having. I am trying to install Nessus scanner on either my Kali 2020.2 or Ubuntu 20.04 LTS VMs on Virtual Box. Granted I have tried this install on both ...
SYNACK21's user avatar
3 votes
1 answer
757 views

How can I get distcc compilation to work in a distributed way via a systemd service?

I have two machines, both running Ubuntu 20.04, and I'm trying to compile some C++ code in a distributed way via distcc (version 3.3.3). When I launch the distcc daemon manually on one machine and ...
Greg Kramida's user avatar
0 votes
1 answer
670 views

Ubuntu "service" command stuck, can't reload services

Using Ubuntu 16.04.6 LTS, it is not possible to call the service command to modify the status of any /etc/init/ services. The command starts but is stuck in execution. The services themselves are ...
Minege's user avatar
  • 21
0 votes
1 answer
311 views

c# script waiting in terminal but exiting directly as a daemon

i am a complete c# noob (i know Java though) i have a c# script i modified. I want to run it at startup using a daemon and systemctl (the original is this NZXT automatic fan controller script) the ...
Mohammad Al-Hajj's user avatar
0 votes
2 answers
2k views

How to start a script on boot in Debian?

I have a script inside of /etc/init.d/wifi and I want to start it on boot. I first gave it permissions by running sudo chmod 755 wifi, then I ran sudo update-rc.d wifi defaults. Finally, I enabled it ...
Hugo Zárate's user avatar
3 votes
0 answers
117 views

Is it possible to delete files on linux before exporting it like virtual machine?

I know that before exporting a virtual machine you need to shutdown the guest OS. I need to delete a file on the system before exporting the machine or after importing it and starting of loading the ...
ananetworking's user avatar
0 votes
2 answers
361 views

Can't run script at startup

Debian Buster Xfce cant use Super (system symbol key) to open wishkermenu emulating the windows behavior of startmenu. So I installed xcape, to modify keys, and ran the shell command xcape -e '...
user406126's user avatar
1 vote
0 answers
276 views

Switching between nvidia and nouveau drivers using gentoo-orientated guide on Debian 10

I'm using Debian 10 XFCE with nvidia driver installed from buster-backports/non-free repository. I want to switch between open source nouveau and proprietary nvidia drivers on boot. I've found a page ...
REmorin's user avatar
  • 11
0 votes
0 answers
139 views

What package is suggested to persist linux iptables during restarts?

Since I neet to use some nat feature, provided by linux iptables I can set those "rules" manually and they work. However after a reboot those "rules" are gone. Having iptables-save I can "dump ...
fraleone's user avatar
  • 747
0 votes
0 answers
766 views

How to add crontab task by reboot / poweroff / poweron pc?

I have next record in crontab -e, running with user root. @reboot /usr/bin/curl --silent --insecure -v -X GET https://<myserver_with_hook>?key=9d722304320de0b074d8da74bf680874&mes='nik-pc ...
Nikita Kalitin's user avatar
3 votes
2 answers
4k views

Wifi issue after sleep

I am running Linux Mint 19 Tara. I cannot understand why but lately my wifi stop working after I resume it from sleep, the only way to make it work is either a reboot or sudo /etc/init.d/network-...
Alessio_110's user avatar
1 vote
3 answers
6k views

Understand the /etc/inittab

I am using the following /etc/inittab file (systemv): # /etc/inittab: init(8) configuration. # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ # The default runlevel. id:5:initdefault: # Boot-...
hutcruchi's user avatar
  • 189
1 vote
1 answer
184 views

Process Ignores Signals + Terminal/Shell Concept

I'm using linux kernel 4.1.8 32bit. My init process (using /etc/inittab and /etc/rd5.d Scripts) run the "Hello" process during boot time: int main(){ int val; printf("Hello\n"); scanf(...
hutcruchi's user avatar
  • 189
0 votes
1 answer
75 views

Variants of startup scripts

i have read of multiple options to have a script executed on startup on my gentoo linux: systemd-service init.d local.d cron are there any other options beside these?
TVK's user avatar
  • 139
1 vote
0 answers
295 views

init script that run a socket continuously

I run my script(socket) as daemon with init-script : #!/bin/bash ### BEGIN INIT INFO # Provides: sock_serv # Required-Start: $local_fs $syslog $remote_fs # Required-Stop: $...
binakh's user avatar
  • 23
1 vote
1 answer
212 views

Reading filesystem type at boot into BASH variable

I have a /etc/rc.d/S11 link to a /etc/init.d file that is trying to set a bash variable of the file system type of a given blkid entry. root@OpenWrt:/# blkid /dev/mmcblk1p3 /dev/mmcblk1p3: UUID="...
Grommish's user avatar
1 vote
0 answers
113 views

Conditionally run command in init.d service script stop() on shutdown/reboot in CentOS6

I have a service script in CentOS 6.10 that needs to touch a file when service myservice stop is called by the user or process, but not when stop() in the script is invoked by shutdown or reboot by ...
Cinder Biscuits's user avatar
0 votes
1 answer
499 views

How to make my sysvinit service work on as many distros as possible?

I am attempting to write a cross-platform sysvinit service that works on as many sysvinit systems as possible. Things I need: The process needs to daemonize (it does not automatically daemonize ...
horseyguy's user avatar
  • 123
0 votes
1 answer
1k views

Linux CentOS: run rc.local after boot

I am running a CentOS (Red Hat Enterprise Linux Server release 7.6 (Maipo)) instance on AWS. I need to add to my boot sequence execution of a rc.local script. How can I do that? I have looked in /ect/...
Andrey Ramnikov's user avatar
2 votes
1 answer
3k views

/etc/inittab respawn already running process, Debian9

I added an antry in /etc/inittab to respawn a binary. The entry is like: id:2:respawn:/path-to-my-bin I then execute init q and the process is started by inittab. If I kill the process, it's ...
Federico Taschin's user avatar
1 vote
1 answer
274 views

How to migrate a multi-instance LSB script to systemd?

I wrote an LSB init script that can manage multiple instances of my daemon: rcfoo start starts all the instances (which are found in some /etc configuration file), rcfoo stop stops all the instances, ...
U. Windl's user avatar
  • 1,104
5 votes
2 answers
10k views

Start a Qt/wayland application on top of weston on startup

I would like to launch a Qt application on start up. The application uses some of the features from weston/wayland desktop, so it should be launched on top of weston, right after weston is started. ...
mozcelikors's user avatar
0 votes
1 answer
287 views

My script not running on start up (linux-lite)

I have script and I want it to run when my system reboot. I put the script in /etc/init.d/superscript and add script to end of the rc.local bash /etc/init.d/superscript # i also test this source /...
Arash Ghaffari's user avatar
2 votes
0 answers
373 views

launch reverse tunnel on init with autossh in the background

I need an init script which will establish a reverse tunnel connection to a server. I've come up with the following start script: #! /bin/sh ### BEGIN INIT INFO ### END INIT INFO case "$1" in ...
stdcerr's user avatar
  • 2,037
1 vote
1 answer
1k views

launch reverse tunnel with autossh on bootup in Ubuntu

I would like to launch a ssh reverse tunnel on system launch. The following line let's me establish the tunnel fine - but I end up being logged into server which I don't want, especially not from an ...
stdcerr's user avatar
  • 2,037
1 vote
0 answers
59 views

Unable to fully execute the task before Shutdown

I have created the script in /etc/init.d/backup, Its function is to take the backup of all the data which took around 10 -15 minutes. I want to execute at shutdown (runlevel 0) and reboot (runlevel 6)....
prash_lix's user avatar
1 vote
1 answer
2k views

Init scripts invoking script on a user's directory -- not working (Ubuntu 18.04)

I want to automatically start email tunnels and socks proxy at boot time. I have an /etc/init.d/email-tunnels script that invokes another script under my home directory. It won't work at boot time, ...
Cal-linux's user avatar
  • 111
0 votes
1 answer
711 views

what dependency-based linux init systems suitable for embedded systems?

Currently, I run Linux on an arm board using Sysvinit, but the network drivers of my board are not the best which causes the network service to stall the boot for a while, I also have problems with ...
MOHAMMAD RASIM's user avatar
3 votes
2 answers
393 views

wget saving files as emply plain text files on boot

I have a bash script in crontab that runs @reboot: The script itself contains a wget command to pull and download a file from the internet When I run my script after signing in and opening the ...
user303148's user avatar
1 vote
1 answer
778 views

Init startup script ordering

In the /etc/rc5.d directory there are example 2 shells to be executed on boot. S02dbus-1 and S20syslog. From my understanding S02dbus-1 will be executed first. Now if I take a look at the shell script ...
mbouchi's user avatar
  • 11
0 votes
1 answer
226 views

Init Script not running from PWD

I have installed gunicorn webserver and make gunicorn virtualenv init.d script but when i run service gunicorn start service from my project directory it works well, But when my present working ...
blaCkninJa's user avatar
4 votes
0 answers
892 views

Show splash screen instantly after system is powered

I would like to execute a command instantly after system is powered. My project is realized in an embedded Linux environment (Yocto-based, with U-boot bootloader), therefore I would like to show a ...
mozcelikors's user avatar

1
2 3 4 5
7