Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rc]

An RC file is a script file containing startup instructions for an application program (or an entire operating system). These are usually a text file containing commands of the sort that might have been invoked manually once the system was running but are to be executed automatically each time the system starts up.

2
votes
0answers
14 views

Run interactive script before reboot

CentOS VM. I got a script for updating firmware that I would like to run before each reboot. However, I want to get user confirmation before the script is actually run. I put the script in /etc/init....
1
vote
1answer
21 views

rc scripts for multiple Zope instances in FreeBSD

I'm trying to configure multiple Zope-Instances as daemons in FreeBSD. Each instance gets a start script in /usr/local/etc/rc.d. Starting works fine, but invoking status or stop is problematic because ...
0
votes
0answers
35 views

/etc/init.d and /etc/rcX.d/: how do they work with systemd

I've known that Debian and Ubuntu have used systemd to manage the services running at boot time. I've known that there were /etc/rcX.d/ and /etc/init.d/, which are also about services running at boot ...
3
votes
1answer
52 views

IPV6 aliases in rc.conf

I am currently running FreeBSD 12.0-RELEASE-p2, and I can't figure out how to create both IPV4 and IPV6 aliases for a loopback (lo1) interface using rc.conf on boot. Here is a snippet of my rc.conf: ...
1
vote
1answer
50 views

How to automatically start Rescuetime on startup (tried crontab and rc.local)

I have installed rescuetime on debian 9. It requires the command rescuetime to be run in a terminal, this just keeps running rather than running and closing (it adds an icon into the tray at the ...
0
votes
1answer
62 views

What is the best way for storing and versioning his aliases/functions/symlinks?

actually I have these lines (exemplary) in my .zshrc file: . ${TOOLS_HOME}/cli/.cli_base . ${TOOLS_HOME}/cli/.cli_functions . ${TOOLS_HOME}/cli/.cli_symlinks This works fine so far. My only problem ...
1
vote
1answer
59 views

Running and managing two daemons with same executable by rc together

I use FreeBSD UNIX and its rc system of startup scripts to make my Node.js servers start at reboot as a daemon and start, as a daemon again, and stop them with some commands the system gives me after ...
1
vote
2answers
334 views

How can I customize $PROMPT_COMMAND without overwriting the default (if present)?

Mac's Terminal comes with a default PROMPT_COMMAND that checks the history and updates the current working directory (title of the tab): Add echo $PROMPT_COMMAND to the top of your .bash_profile and ...
-3
votes
1answer
85 views

Fixing RC4 cipher suites [closed]

I've conducted an AppScan on my web application, and it determined that the site uses weak cipher suites, as the AppScan successfully created SSL connections using each of the weak cipher suites ...
0
votes
1answer
372 views

boot normally even with an infinite loop in /etc/rc.local

I put a python script with an infinite loop into /etc/rc.local but the machine boots successfully, which confuses me. The /etc/rc.local content: #!/bin/sh -e # # rc.local # # This script is executed ...
0
votes
0answers
35 views

How do I view a script run by rc.local?

I am running a python script from boot using rc.local. It runs fine but I can't see the console which makes it difficult to debug my software. Is there anyway to make the console pop up like it would ...
0
votes
1answer
257 views

FreeBSD 7.3: service is working, but status shows “is not running”

Something wrong with one service on FreeBSD 7.3: 1) it starts with command "service my_secret_service start" but later if I enter "service my_secret_service status" - it shows as not running. But in ...
2
votes
1answer
1k views

zsh: is there a problem with always enabling extended glob?

I recetnly came across setopt extended_glob ...in order to enable extended globbing which allows for a number of cool wildcard additions, like excluding specific patterns, for example: ls ^foo* ......
0
votes
2answers
618 views

New MySQL Installation on pfSense returns 'Bad -c option' when started

this is my first time actually using FreeBSD so there's a chance I might have missed something big, but it's unlikely. So I want to set up mysql on my pfSense server so I can enable historical ...
0
votes
1answer
151 views

Does rc.local crash?

I am using rc.local to run a python script on boot up on a raspberry pi and it almost always runs without an issue but on occasion, it seems like it might be crashing. Can a script run in rc.local ...
2
votes
1answer
77 views

Is there any database solution that can do master-master replication by default on OpenBSD?

There are many "built-in" softwares for OpenBSD, ex.: NTP, LDAP, RADIUS, etc., see all (?): https://github.com/openbsd/src/blob/master/etc/rc.conf in the rc.conf file. The question: Currently, ...
3
votes
4answers
5k views

Fedora 27 not running rc.local when booting

I was trying to get the Shadowsocks server running automatically after booting, and I used the rc.local file, but it was not working. rc.localis now: /usr/local/bin/ssserver -c /etc/shadowsocks.json ...
2
votes
2answers
193 views

My ubuntu-server doesn't execute my gtk-based program at startup!

I have Ubuntu-server 16.04. Installed gtk3 and can execute my program manually by this command: ./img when I go to it's directory /home/m. But when I tried to add this line to my /etc/rc.local file: ...
3
votes
0answers
48 views

How to determine what commands a FreeBSD rc script runs

I'm having problems starting a service managed by rc. I can't see anything in /var/log that looks relevant, so I'd like to try running the command manually. I know I can read through the script in /...
1
vote
1answer
375 views

How to add an alias IP to a VLAN interface in FreeBSD

How can I add an alias to a VLAN interface in FreeBSD? I tried the following, but it seems to be ignored: # /etc/rc.conf vlans_igb0="vlan42" create_args_vlan42="vlan 42" ifconfig_igb0="up" ...
1
vote
0answers
294 views

Adding run levels in ubuntu

I want my postgres service to start at run levels 2,3,4,5 and stop at 0,1,6. So, I ran the following command $ sudo update-rc.d postgresql start 30 2 3 4 5 . stop 30 0 1 6 . When I stop the ...
0
votes
1answer
1k views

ubuntu 16.04 a chmod command not excuted in rc.local automatically

I'm trying to run a chmod command in rc.local so that it gets executed at startup. The command enables the I2C device to be accessed. However, I need to manually run rc.local in order for it to work. ...
0
votes
1answer
1k views

Using ~/.dircolors in fish shell

I just recently switched to the fish shell from bash and I am having trouble sourcing my dircolors template file to get custom colors to appear for certain file extensions. In bash, I was sourcing a ...
1
vote
1answer
97 views

Join an interactive session of a process launched from rc.local

Is there a way to join an interactive session of a process that was ran on boot with /etc/rc.local, or send it "stop" over STDIN on reboot/shutdown and wait for it to end before shutting down?
3
votes
1answer
182 views

Change the direction of a new client appearance in Awesome Window Manager

In previous releases of Awesome WM new client title appeared to the right from the previous client. So, client titles were ordered from left to right by their order of appearance. In new releases of ...
2
votes
2answers
114 views

bricked my beaglebone with a bad rc script

I dropped a new script into /etc/init.d, and used update-rc.d to install it into the other rc#.d subdirectories. Unfortunately I made two stupid mistakes: The script runs a long-running command (...
1
vote
1answer
769 views

FreeBSD - best way to set console vidcontrol mode from boot without disrupting scrollback buffer info

My system uses vidcontrol to change video mode, and I'd like to set a tighter video mode from boottime, for all console windows/devices. man vidcontrol says to do this by editing it into rc or rc....
1
vote
1answer
4k views

Windows Subsystem for Linux is unable to determine current runlevel

Issue Many apt-get installs are failing b/c the system can't determine current runlevel Background specs: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: ...
0
votes
1answer
246 views

slapd doesn't start automatically despite rc.conf entry

I can successfully start slapd on FreeBSD 11 perfectly fine, but it won't run on startup. Here is what I put in my rc.conf: slapd_enable="YES" slapd_flags="-h "ldap://1.2.3.4/ ldapi://%2fvar%2frun%...
0
votes
0answers
361 views

rc.local does not run program with parameters correctly

I am on Armbian. I am trying to run hyperion-v4l2 in /etc/rc.local (please it is not important why for now) with these parameters: Code: /home/user/hyperion/build/bin/hyperion-v4l2 --device /dev/...
0
votes
1answer
125 views

How to start a dialog at startup after login in?

I want to display a dialog at startup after the user log in? How would you suggest to do automatically launch a dialog at startup? Example of dialogue: zenity --question
0
votes
1answer
387 views

need to execute the python script at time of shutdown

I have created python script and want to run it at time of shutdown. I have saved the script in /etc/init.d and created a soft link for it in the rc0.d directory, but the script is not working. I am ...
3
votes
2answers
1k views

How to autostart KDM on boot in OpenBSD 6.0?

I have installed kde4 (via running # pkg_add kde4) on my OpenBSD 6.0 VM and I would like to automatically boot KDM on startup. I have followed the most applicable guide Google found me, but it didn't ...
0
votes
3answers
892 views

Openbox - multiple commands separated with & for one keypress

I am trying to configure Openbox's rc.xml file in order to manipulate my soundcards with one keypress. Because I have multiple sound cards on my system I have to manipulate multiple sinks at once so I ...
1
vote
1answer
4k views

How to automatically add keyfile and passphrase to ssh-agent?

Linux 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux I use the script to start ssh-agent and start other script (which is using expect to sent passphrase ...
4
votes
1answer
351 views

Stow doesn't use the “ignore” option given in the rc file

Summary --ignore=<regex> lines that I put in my .stowrc does not work. When running Stow, it says "Loading defaults from .stowrc", yet it has no effect. But passing the --ignore=<regex> ...
3
votes
1answer
1k views

Cannot trigger tmux script on boot

I have a tmux triggering script as mentioned below, running on Raspbian Wheezy 7.10: Step 1 #!/bin/bash # this script is called "sess" tmux new-session -d -s sess1 'sudo /home/pi/bin/myscript.py' ...
0
votes
2answers
356 views

ifconfig not displaying NIC's and also no wired Ethernet connection

After rebooting, my network interface card (renamed from eth0 to enp0s25) is not displayed with the command ifconfig, only in ifconfig -a. Also ping -c 4 google.com only yields unknown host. In my /...
1
vote
0answers
73 views

Runlevels behaviour when kill script has failed

When I execute sudo init 3, the system executes the kill scripts in /etc/rc.3/ One of those scripts returns a failure (this is expected because the thing it's trying to do won't work). When I then do ...
1
vote
1answer
446 views

Trouble update-rc.d remove'ing dnsmasq on Debian Stretch

Background: On my Debian Stretch machine at home, I've noticed my DNS lookup times are pretty slow, and have concluded that the culprit is dnsmasq - since if I take it down, name resolution becomes > ...
6
votes
1answer
3k views

Why do we daemonize processes? [closed]

I've read and understood about how you create a daemon process, but from everything I read I never really understood why it needs to be done. I've read that we do the fork - setsid - fork to avoid ...
0
votes
1answer
24 views

why rc and rc.x are linked

May I know why we have them linked ? is there any reason behind this ? lrwxrwxrwx. 1 root root 7 Aug 7 2015 rc -> rc.d/rc lrwxrwxrwx. 1 root root 15 Aug 7 2015 rc.sysinit -> rc.d/rc....
1
vote
1answer
843 views

Prevent shutdown using shell script run at shutdown

Background: I have a Python script that runs (infinitely) from startup in the background of a Ubuntu server. The process is ended by sending a SIGINT which is handled by the script which finishes all ...
0
votes
1answer
197 views

Running script at startup and exiting gracefully at shutdown

I am currently running a script at startup using /etc/rc.local. The problem is that during shutdown, it does not exit gracefully. This can cause (important) data loss. My script has a SIGINT handler ...
0
votes
1answer
314 views

change boot order in rc.d

I currently have scripts in the rc.# S## ... one of my scripts is called: S20cheese and another is called S19Moo. How would I properly update these run orders e.g. S20cheese -> S15cheese. Is it as ...
0
votes
0answers
363 views

No RC messages at the start between kernel loading and login prompt

I have a 4.3.2 kernel and OpenRC 0.19.1. After the kernel loads there is no messages from the RC scripts. And then, there is the prompt to log in. There is another system with identical rc.conf and ...
1
vote
0answers
313 views

tmux start process if not already running

In my .zshrc, I have a bit of logic that will automatically start a tmux session or, if sessions are already running, prompt to attach to one of them or create a new one and attach to that. This all ...
1
vote
0answers
53 views

'Chain' shells' profile and runcom files?

While setting zsh up, I found a post stating that to keep a .zshrc as clean and backwards compatible as possible, one can 'chain' the shells' configuration files. If I recall, it consists more or less ...
0
votes
1answer
2k views

systemd[1]: Failed to start /etc/rc.local Compatibility

I'm using Raspbian on a Raspberry Pi, and I see this error when booting up the system: Nov 25 20:30:38 raspberrypi systemd[1]: rc-local.service: control process exited, code=exited status=127 Nov 25 ...
1
vote
0answers
114 views

Add keyboard switcher to stalonetray

I am running xmonad on top of your average Ubuntu installation. In xmonad, I run stalonetray to handle wifi. This is my .xsessionrc: stalonetray & nm-applet & exec xmonad How do I add ...