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
0answers
23 views
+50

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) ...
0
votes
1answer
32 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 ...
1
vote
2answers
88 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 ...
1
vote
0answers
108 views

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

So 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 ...
0
votes
0answers
14 views

is it possible to standby a disk immediately after i hit unmount?

i'm booting linux thru my SSD which is Disk 0, and my second Disk 1 (which is a HDD) for other storage. i want to keep my Disk 1 turned off when i'm not using it, and when i hit mount i want the ...
0
votes
1answer
20 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, ...
1
vote
1answer
1k 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 ...
2
votes
1answer
231 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 ...
0
votes
1answer
31 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 ...
0
votes
1answer
29 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 ...
0
votes
0answers
26 views

Best way to modify crontab during boot? (init-scripts)

I would like to add an entry to crontab at boot dependent on a condition. What is the best way to do this? Note that if the condition is not true I do not want the job to run. If the condition is true ...
0
votes
0answers
18 views

What does switch_root do to mountpoints except /proc, /dev, /sys and /run

I'm unsure about exactly how switch_root handles other mountpoints. As per the description in switch_root manpage all I could know is that it moves /proc, /dev, /sys and /run to the newroot and ...
0
votes
1answer
541 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 ...
0
votes
2answers
157 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 '...
1
vote
0answers
181 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 ...
0
votes
0answers
39 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 ...
0
votes
0answers
262 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 ...
1
vote
2answers
2k 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-...
0
votes
3answers
3k 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-...
0
votes
1answer
116 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(...
0
votes
1answer
35 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?
1
vote
0answers
78 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: $...
1
vote
1answer
122 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="...
1
vote
0answers
45 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 ...
0
votes
1answer
252 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 ...
0
votes
1answer
819 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/...
2
votes
1answer
2k 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 ...
1
vote
1answer
151 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, ...
4
votes
2answers
5k 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. ...
0
votes
1answer
179 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 /...
2
votes
0answers
222 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 ...
1
vote
1answer
776 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 ...
1
vote
0answers
57 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)....
1
vote
1answer
1k 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, ...
0
votes
1answer
367 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 ...
3
votes
2answers
260 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 ...
1
vote
1answer
343 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 ...
0
votes
1answer
177 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 ...
4
votes
0answers
531 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 ...
6
votes
2answers
3k views

Can I make Qemu exit with failure on kernel panic?

I'm trying to add Qemu to my continuous integration pipeline to test various initrd artifacts. I've already discovered that I can run Qemu like this: qemu-system-x86_64 \ -machine q35 \ -...
0
votes
1answer
4k views

Automatic sudo permissions for startup script

I need to run a script upon startup, which I understand needs to be done in the init.d folder. Now this script requires sudo permissions, it prompts the user for the sudo password when being run ...
2
votes
2answers
1k views

Mounting Encrypted Softraid on OpenBSD

The Setup I have a machine that is running OpenBSD, it has two SSDs in it: sd0 and sd1. I've setup each SSD with two partitions a and d. From there I've built two mirrors using bioctl: The first ...
2
votes
2answers
7k views

systemd failing to recognize pid file

So I am trying to start a service on systemd enabled system. Name of service is ossec-hids-authd which is the authentication engine(agents) in ossec(Intrusion Detection Software). When I go and start ...
4
votes
1answer
10k views

Catch-all command to restart display manager?

Is there a catch-all command to restart display managers (on any given common init system)? I've got systemctl restart display-manager for systemd-based systems currently, but I don't know that that'...
1
vote
0answers
1k views

Changing permissions of /sys/ directory at boot (permanently)

I'm building a system, using buildroot, that will have a webpage to control a raspberry's GPIO pins, using php. To do so, I'm writing (and reading) the kernel files located in /sys/class/gpio/.. the ...
7
votes
1answer
14k views

Can systemctl list all enabled services, including legacy services?

This question asks: "How to list all enabled services from systemctl?" Answers on that page include: systemctl list-unit-files | grep enabled systemctl list-unit-files --state=enabled At least as ...
0
votes
0answers
27 views

Granting service specific capabilities

I have a sm-t365 rooted tablet. I've created a service in the init.rc file that all it does is create a folder in /data (which requires root), it works if in my service in init.rc i specify user root.....
1
vote
1answer
454 views

RHEL /usr/local v.s. /usr on NFS - mount/unmount order?

At least historically, Red Hat wrote In Red Hat Enterprise Linux, the intended use for the /usr/local/ directory is slightly different from that specified by the FHS. The FHS says that /usr/local/ ...
1
vote
0answers
117 views

init system run level services restart after crash?

I've been learning about the run levels of init systems and I understand a service can be set to run at a certain run level so it always starts at that given run level. But what happens if the ...
0
votes
0answers
123 views

CentOS 7 SystemD Script with additional Command [duplicate]

I've created a SystemD Script to manage an application that is set up as follows /usr/lib/systemd/scripts/testsocket start() { // code here } stop() { // code here } restart() { stop ...

1
2 3 4 5
7