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
1 vote
2 answers
108 views

FreeBSD: /etc/rc.conf persistently read-only

I am running a single-user FreeBSD and I am trying to edit rc.conf but it appears to be read-only for some reason. I can't change it from the root account. Indeed, id gives: uid=0(root) gid=0(wheel) ...
1 vote
0 answers
37 views

For automatic startup is it enough to copy script to /etc/rc.d folders?

we have installed some tool on RedHat linux 8.5 which comes with a README file that explains steps we should do, in order to enable automatic startup: Copy the 'accurev' script to the /etc/rc.d/init....
  • 198
1 vote
1 answer
53 views

Would including a line like "source ~/rc/.zshrc" in my ~/.zshrc be equivelent to including all the text from ~/rc/.zshrc in my ~/.zshrc?

I want to keep my ~/.zshrc in a github repo, and since I don't want to make my ~ folder a git repository, I plan to move my ~/.zshrc to a folder called rc and then include source ./rc/.zshrc in my ~/....
  • 33
0 votes
0 answers
36 views

How do I know what config files are being read by my bash shell? [duplicate]

I'm on a macOS system. My SHELL variable says /bin/bash, but I have Homebrew bash installed too. I deleted my .bash_profile file, and my .bashrc only sets the PATH. But now every time I type Command+T ...
  • 129
2 votes
1 answer
253 views

how to distinguish ssh from scp in ~/.ssh/rc?

I'd like to launch neofetch (a small utility that displays a banner) each time I log into a remote server via OpenSSH. So, I just added /usr/bin/neofetch into my ~/.ssh/rc file, and it works fine. The ...
  • 1,134
0 votes
1 answer
239 views

What language do config files use?

I've been using GNU/Linux for over a year now. And there's this question to which I need an answer from you, Linux gurus: What language(s) do config files like .bashrc, .vimrc, .i3status.conf, ....
2 votes
1 answer
129 views

zsh completion for kill listing unexpected "0"

I have following in my .zshrc: zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' When I press TAB, in addition to processes being listed, there is always a last line ...
-1 votes
1 answer
228 views

Does the rc folder contain files that start on boot?

I created a file in /etc/rc0.d, named it rc.local. In this file I added a line that run another file that I had put in Desktop. I did all this so that the command can be run on boot. I followed the ...
0 votes
1 answer
1k views

Ranger: set default apps for files

I use arch linux, ranger and nvim. When I try to open any text file, ranger does not do anything and this is on output: /bin/sh: line 1: vim: command not found What can i do to open file in neovim ?
0 votes
2 answers
201 views

How do I use multiple .zshrcs?

I want to use different zshrcs and choose one using a single file tat holds variables and loads them up. I've tried looking it up, but there are only for iTerm2. I would appreciate any support. Thank ...
  • 95
0 votes
2 answers
152 views

How to run Odoo ERP as daemon on FreeBSD?

I've cloned odoo ERP using git, in directory /home/amr/erp/odoo. Of course I've create a virtual environment and created a startup script "odoo" in /usr/local/etc/rc.d My concern is not to ...
  • 61
0 votes
1 answer
177 views

What are the key components of a desktop environment?

I'm a relatively new Linux user. I started with Ubuntu 20.04 a few months ago, and eased myself into the experience, learning a bit of the command line and becoming familiar with the system structure ...
  • 177
4 votes
3 answers
839 views

Is it possible to have conditionals in /etc/rc.local?

Is it possible to have a conditional within /etc/rc.local? I've checked many Q&As and most people suggest running chmod +x on it, but my problem is different. It actually does work for me without ...
  • 561
2 votes
1 answer
304 views

Proper way to checkout home directory .rc files from a git repo?

What is the proper way to checkout a bunch of .*rc files into a home directory? I've seen lots of github repos online and people usually name them dotfiles, and I guess they get checked out into ...
  • 4,249
4 votes
1 answer
358 views

FreeBSD sysrc to add comments

Is there a way to use FreeBSDs sysrc to add comments to the file that it’s modifying? For example, if I had an /etc/rc.conf with the standard stuff hostname=“FreeBSDMachine” ifconfig_em0=“DHCP” ...
  • 964
0 votes
3 answers
45 views

How does Linux know what function to choose in rcX.d directory?

For example, I have the following script: ... start(){ echo "Starting..." su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole" ...
  • 379
0 votes
0 answers
33 views

cupsd not starting at boot in TrueOS

I have installed a TrueOS 13.0-CURRENT desktop system with cups 2.2.8 installed from pkg. Printing works like a charm, but cupsd is not starting at boot, despite this being in /etc/rc.conf: ...
  • 17
3 votes
1 answer
1k views

.bashrc or .profile for busybox on windows

I have enough experience with scripting on *nix servers, but busybox on Windows I enjoy first. I installed busybox using scoop. When I run: ash echo $HOME I got -> C:/Users/RO # OK, this is dir ...
  • 31
0 votes
0 answers
200 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 ...
  • 129
1 vote
1 answer
1k 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 ...
  • 113
2 votes
0 answers
53 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 ...
  • 783
0 votes
0 answers
163 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 /...
  • 114
0 votes
1 answer
200 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 ...
  • 114
2 votes
0 answers
61 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
1 answer
249 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
0 answers
186 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 ...
  • 2,891
2 votes
1 answer
546 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: ...
2 votes
1 answer
2k 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 ...
  • 123
0 votes
1 answer
232 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 ...
  • 101
1 vote
1 answer
659 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 ...
  • 111
5 votes
2 answers
2k 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 ...
  • 351
-3 votes
1 answer
1k 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 ...
1 vote
1 answer
2k 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 ...
  • 814
0 votes
1 answer
1k 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 ...
  • 793
11 votes
1 answer
9k 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* ......
  • 975
0 votes
2 answers
2k 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
1 answer
304 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 ...
6 votes
3 answers
5k views

How to properly enable httpd with rcctl on OpenBSD so that it starts automatically?

On a OpenBSD machine running OpenBSD 6.2 amd64, httpd cannot be started by using rcctl: # rcctl start httpd httpd(failed) However, when started by just entering httpd, it works; but this is not the ...
2 votes
1 answer
170 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, ...
  • 541
3 votes
4 answers
9k 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 ...
  • 429
2 votes
2 answers
425 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: ...
  • 349
3 votes
0 answers
63 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
1 answer
767 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" ...
  • 271
1 vote
0 answers
417 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 ...
  • 181
0 votes
1 answer
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. ...
3 votes
1 answer
4k 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
1 answer
163 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?
6 votes
1 answer
1k 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 ...
  • 301
2 votes
2 answers
224 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
1 answer
3k 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,121