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.

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

execute script on startup without rc-update

I want to execute a script that sets iptable rules on each startup. I read about the option to write a *.start script to /etc/local.d here, but I cannot execute rc-update add local default to add ...
1
vote
1answer
65 views

Add an SSH key on boot

I have a Git repo that is authenticated with an SSH key - the key is not the standard id_rsa. I can run: eval $(ssh-agent -s) ssh-add /home/forge/.ssh/otherkey Then git pull origin master This ...
0
votes
0answers
19 views

Something like a rc script for ssh clients but configured in the client-side

I am searching if it is possible to configure my ssh client, to connect on my servers and run a general script for each login, without the need to configure a rc local for each server. I know its ...
2
votes
0answers
38 views

Is there something like rc.local in systemd? [duplicate]

Back with system V init there was a script called rc.local where you could stuff commands that needed to be run during bootup, which would not fit to one particular service. Does systemd have a ...
0
votes
0answers
38 views

Why do the shutdown and startup scripts placed at /etc/init.d/ not run on shutting down or during startup?

I basically have a simple script #!/bin/sh sudo echo "process kill" >> /home/logfile placed at etc/init.d/lokill and symbolic links K99lokill to /etc/init.d/lokill placed at /etc/rc0.d and /...
0
votes
1answer
22 views

Why do all the links in /etc/rc6.d start with K if runlevel 6 corresponds to reboot?

I was trying to find out how to run a script at startup and during shutdown during which I got to know that level 6 corresponds to reboot in ubuntu. When I opened the /etc/rc6.d every link's name ...
2
votes
0answers
22 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
43 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
59 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
211 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
332 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
86 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
91 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 ...
4
votes
2answers
1k 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
241 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
759 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
1answer
486 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
3k 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
956 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
187 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
98 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
7k 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
243 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
60 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
497 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
380 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
2k 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
2k 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
105 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?
4
votes
1answer
361 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
145 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
1k 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
5k 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
358 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
415 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
229 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
510 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 ...
2
votes
2answers
2k 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
4answers
1k 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
515 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
2k 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
445 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
79 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
508 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 > ...
7
votes
1answer
5k 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
25 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
891 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
250 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
381 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 ...