rc.d

  1. D

    Shell rc.d script returns status running while the pid is no longer alive

    I've based the rc.d script on the odoo one. However I'm installing in a virtualenv. From time to time the process crashes. However when doing /usr/local/etc/rc.d/odoo status it shows as running. When I check the pid that is in /var/run there's no process with that pid. I have set procname to...
  2. I

    Forgejo failing to start as service / pid file not readable

    I am trying to get forgejo running as a service in a jail. When I manually start forgejo as the git user it runs as expected, however attempting to get it to run with the included rc file provided by the ports package it errors out. Forgejo Port rc.d script When I start forgejo manually it...
  3. I

    Why doesn't unbound rc.d script require syslogd?

    FreeBSD 14.0. Neither /usr/local/etc/rc.d/unbound, nor /etc/rc.d/local_unbound list syslogd among their requirements. So, if unbound service (either one) is started by setting respective X_enable="YES" in /etc/rc.conf, then it just so happens that unbound is started before syslogd. Which means...
  4. D-FENS

    Solved Writing an rc.d script for a service wrapping multiple processes

    I am trying to implement an rc.d service script that starts multiple processes. The exact number of processes is determined dynamically from an rc.conf variable like so: dummy_process_count=5 I read the tutorial Practical rc.d scripting in BSD, but there is no example with multiple processes...
  5. B

    Shell Daemonize a program through rc.d script

    I am still struggling to create a working rc.d script for onedrive. covacat has explained that I need to explicitly define environment variables, but now I am facing another issue: rc.d starts onedrive exactly as it should, but the program starts and stays in the foreground. Meaning: During the...
  6. B

    Solved Running a rc.d script as another user

    Hello, I am trying to set up a daemon for onedrive. It needs to be run as a specific user, because onedrive has to read the authentication token from the user home directory, and then synchronize into that directory. However, ${onedrived_user="borysj"} does not do the trick. I see that the...
  7. D

    How to override start_precmd of existing rc.d script

    How should I override the start_precmd of an existing rc.d script? If the rc.d script contains load_rc_config ${name} towards the end of the script (e.g. right before run_rc_command "$1"), it would be a simple matter of creating a file /etc/rc.conf.d/myexample to override the start_precmd of the...
  8. Pierre-Marie Baty

    How to quickly see which services are running at login

    Hello all FreeBSD users, With the intent of saving me time when I check in my FreeBSD server over SSH, I added a one-liner to my .profile that tells me which of the machine's configured services are alive and which ones are dead. It's working well and I thought I'd share. #!/bin/sh printf...
  9. T

    Solved How to run rc.d service as specific user?

    I am attempting to create two /usr/local/etc/rc.d services, using rc.subr(8) after reviewing https://docs.freebsd.org/en/articles/rc-scripting/. Service B's process must always run as root, while service A's process must always run as another less privileged user (some_user). The other user must...
  10. A

    Solved Rc.d daemon as user (emacs)

    Emacs can be run as a daemon using a flag: emacs --daemon. Then, all subsequent calls of emacsclient should connect to the server, saving startup time. FreeBSD's Emacs package doesn't seem to include any rc.d scripts so it's up to the user to procure one and that's what I'm trying to do. I...
  11. D

    Solved Startup script not found

    I am trying to adapt the script found here to my purposes: https://www.nginx.com/resources/wiki/start/topics/examples/freebsdspawnfcgi/ Initially I followed the instructions and put the script in /etc/rc.local but the script was then being triggered before nginx and mysql loaded. I need it to...
  12. U

    Solved ezjails-admin flavour_setup() fails under FreeBSD 13

    So my initial problem was solved before I made this post (don't use - in $name) but I'm here to ask your help in aiding me to find the changes and showing me, where to look/read. I have multiple flavours one of them called basic-dns On first run /etc/rc.d/ezjail_flavour_basic-dns is called...
  13. I

    rc.d shell scripts: no extension vs. .sh

    I think I asked this question sometime ago, but I can't find the answer when searching for it. Anyway... First, I think I know the difference for startup shell scripts located in /etc/rc.d and /usr/local/etc/rc.d. The former is for system scripts while the latter is for user-installed scripts...
  14. A

    Solved Service does not exist or is not executable

    I am setting up a gemini protocol server written in go called "molly brown" link to git repository. I have placed its bianary file in /usr/local/sbin/molly-brown I placed its initscript at /etc/rc.d/molly This is its initscript: #!/bin/s#!/bin/s#!/bin/s#!/bin/s#!/bin/s#!/bin/s#!/bin/sh #...
  15. epopen

    net/ntp startup twice or more? in boot time.

    Hi all I have a question, can help debug? ? I using net/ntp for time synchronization. rc script file /usr/local/etc/rc.conf.d/ntpd added as below ntpd_enable="YES" ntpd_program="/usr/local/sbin/ntpd" # path to ntpd, if you want a different one. ntpd_config="/usr/local/etc/ntp.conf" #...
  16. vicmarconi

    Can't stop/restart program started by rc.d script (“is not running”)

    Hi folks, I've created this rc script to start gunicorn as a daemon on boot following this article (practical rc scripting). #!/bin/sh # PROVIDE: gunicorn_appleclue # REQUIRE: DAEMON . /etc/rc.subr name=gunicorn_appleclue rcvar=gunicorn_appleclue_enable...
  17. F

    Solved Using rc.d script with /usr/sbin/daemon to start and stop a script

    I am trying to write an rc.d script to start and stop a (Python) script. Starting the command seems to be working, but stopping it is not yet the way I want. My goal is to ensure the script receives a SIGTERM signal when it should shut down; that seems not to be the case; I think only the...
  18. F

    Solved Running Emacs as a daemon

    Hi guys, I would like to start emacs as a daemon at boot, using the configuration file of an user named "alex". Here is my rc.dscript, in /usr/local/etc/rc.d/emacsd #!/bin/sh # PROVIDE: emacsd # REQUIRE: login # after login # Emacs daemon . /etc/rc.subr name="emacsd" rcvar=emacsd_enable...
  19. K

    Solved How to get caddy file to autostart with Rc.d script

    I have a jail with caddy, mysql and wordpress running. I do not know how get the caddy service to autostart. Caddy runs with the command "caddy run ---config /path/to/Caddyfile" the Caddy service that I have kluged together runs and works perfectly "service caddy start" but will not auto-run...
  20. Hornpipe2

    Solved rc.d + pidfile + ${name}_user = permission errors?

    I'm trying to create an rc.d script for an existing port (games/ioquake3-server), which will allow it to launch at system start, and be managed by the rc system. This software is "interactive" (opens a console on stdin for control), so I have to launch it using daemon instead to detach and keep...
Back
Top