Questions tagged [rc.d]

Command scripts for auto-reboot and daemon startup as used on NetBSD, FreeBSD, and OpenBSD

rc.d, or rc is the command script which controls the automatic boot process after being called by init(8).

It's an enhancement of the 'classic' script. The implementation originated in NetBSD 1.5, which served as base for the implementations in FreeBSD & OpenBSD.

7 questions
2
votes
1 answer

How to debug rc.d scripts in FreeBSD?

I have a bash script in my /usr/local/etc/rc.d/ that should run python script. I run the bush script with service script_name start and nothing happens at all. How could i debug that rc.d script? How could i know what is going on?
Pachvarsh
  • 137
  • 1
  • 10
1
vote
2 answers

How to build FreeBSD pkg from python app with an rc.d script?

I have a python app with its setup.py that's working just fine to install it through setuptools. I am then packaging it up in DEB and PKGNG using the excellent Effing package management. I've also made some quick tests with setuptools-pkg and that…
Luke404
  • 10,282
  • 3
  • 25
  • 31
0
votes
0 answers

How to write a working rc.d script for OpenBSD to launch a ruby program that lives in /sbin/?

This is everything that I've done: I wrote the rc.d/ script, it looks like this: #!/bin/ksh daemon="/usr/local/sbin/dynaruby" name="dynaruby" . /etc/rc.d/rc.subr rc_cmd $1 The program needs an environment variable to work. I tried setting it up…
Dillon Wreek
  • 53
  • 1
  • 9
0
votes
1 answer

Why isn't chdir happening for this rc.d script?

I've hit a wall trying to understand why the ${name}_chdir variable is not working for me. Finally, after letting my script run with -xv, I see that the cd command is not even being run in my case. Here is my script: #!/bin/sh set -xv exec…
papiro
  • 2,158
  • 1
  • 20
  • 29
0
votes
2 answers

FreeBSD rc script with output to file

I have this script below where I start a python program. The python program outputs to stdout/terminal. But I want the program to be started via rc script silently. I can start the and stop the program perfectly. And it also creates the log file,…
user2931144
  • 147
  • 2
  • 14
-1
votes
1 answer

issue with restarting autossh reverse tunnel on boot

I seem to have a weird issue: I want to restart a reverse ssh tunnel on boot, I've tried it with an init script (that works fine when executed as user) and with an added line in /etc/rc.d but none of it works. What I get after boot is: $ ps ax |…
stdcerr
  • 13,725
  • 25
  • 71
  • 128
-2
votes
1 answer

How to restart a background process in Linux through rc.local?

I have a very peculiar case of ASP.NET Core APIs running on my Linux. I have two environments PROD - https://somesite.com - UI and it's API endpoint - https://somesite.com/api DEV - https://somesite-dev.com - UI and it's API endpoint -…
yodellingbutters
  • 285
  • 6
  • 20