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.
121
questions
0
votes
1
answer
49
views
When is the ENV variable set
according to POSIX, the ENV environment variable is used to specify initialization files to be read (such as some kind of .profile and .rc files), but if this variable is used to specify these files, ...
1
vote
1
answer
70
views
Forgejo pid file (/var/run/forgejo.pid) : not readable in Truenas Core (FreeBSD Jail)
I have been trying to get Forgejo running in a Truenas Core (FreeBSD jail) for over a week. When I manually start Forgejo as the git user it runs as expected, however attempting to get it to run with ...
0
votes
0
answers
11
views
Issue with GPS on RPi4 at boot
So I have RPi4 which I configured with multiple UARTs and a Ublox ZED-F9P on a custom designed board. My setup would use the UART1 on the F9P for ubx messages and the UART1 for NMEA messages that used ...
0
votes
0
answers
89
views
Automating proxy configuration across multiple applications without plaintext password
More generally than the post described here: Using bash functionality in rc files
I would like to set an appropriate proxy configuration for all/multiple applications including but not limited to: ...
0
votes
1
answer
97
views
Using bash functionality in rc files
I am trying to do something similar to Avoiding plain-text password in http_proxy but inside the .wgetrc/.curlrc configuration files. For whatever reason, I have spotty luck by passing proxy settings ...
0
votes
1
answer
41
views
/etc/rc.local not being run everytime a user logs in via ssh [closed]
I have set up the /etc/systemd/system/rc-local.service as follows:
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local ...
2
votes
1
answer
850
views
python script as rc service on freebsd
I have a python script that I would like to run in a Freenas jail. It works without the service daemon, but I would like to start it as a service.
I have created the following service script /etc/rc.d/...
0
votes
1
answer
330
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
...
2
votes
2
answers
1k
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
835
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....
1
vote
1
answer
183
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 ~/....
0
votes
0
answers
39
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 ...
2
votes
1
answer
509
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 ...
0
votes
1
answer
976
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
202
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
1k
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
3k
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
2k
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 ...
0
votes
2
answers
293
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 ...
0
votes
1
answer
362
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
...
4
votes
3
answers
1k
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 ...
2
votes
1
answer
592
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
votes
1
answer
884
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”
...
0
votes
3
answers
65
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"
...
0
votes
0
answers
73
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:
...
4
votes
1
answer
2k
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 ...
0
votes
0
answers
316
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
...
2
votes
1
answer
2k
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 ...
2
votes
0
answers
63
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
0
answers
168
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
1
answer
441
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
0
answers
69
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
366
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
214
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
votes
1
answer
807
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 ...
0
votes
1
answer
336
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
1
answer
1k
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 ...
6
votes
2
answers
3k
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
1
answer
2k
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 ...
0
votes
1
answer
2k
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 ...
16
votes
1
answer
15k
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
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
397
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
7k
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
214
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
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 ...
1
vote
2
answers
636
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
0
answers
78
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 /...