rc.d

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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 #...
  8. 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" #...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. L

    Shell Custom rc.d script trouble

    I am using an open source project (Traccar) and they provide a rc script to start and stop the service https://www.traccar.org/freebsd/ This script doesn't work, I can easily start the server if I do: # cd /usr/local/traccar # java -jar tracker-server.jar conf/traccar.xml & However, I want to...
  15. B

    Other rc.subr function usage in rc.d script

    Hi, I have difficulties to understand the syntax to use rc.subr function and arguments. I would like to use run_rc_command in my rc.d script but how should I call for argument and use this function anyway? Is it a replacement for start_cmd= or should I do start_cmd=run_rc_command args? and...
  16. F

    Other Writing an rc script for gunicorn & django

    Hello all, I'm looking to deploy a Django application onto a FreeBSD 11.1 server, I've read a number of articles about using www/py36-gunicorn to provide the communications between www/nginx and Django, and brief trials appear successful. I'm now looking to make a service that I can service...
  17. T

    Python rc.d with daemon(8), python and virtualenv

    Hi, I'd like to create an rc.d script that uses daemon(8) to manage a python(3) script with dependencies from virtualenv (daemonization, logging and be automatically restarted on exit). I am not sure what's the right way to approach this. My initial version used the script as command...
  18. V

    Solved no one service started successfully

    Hello recently I upgrade from 11.0 to root@dell:/home/vic # freebsd-version -u 11.1-RELEASE-p1 and now no one service started successfully during booting. Reason look come from root@dell:/home/vic # service syslogd onestart /etc/rc.d/syslogd: DEBUG: pid file (/var/run/syslog.pid): not...
  19. T

    /etc/rc.d/bluetooth - enable or disable variable?

    When I run the bluetooth script I notice it doesn't have any variables: root@www# service bluetooth rcvar # bluetooth # compare to another random service root@www# service ntpd rcvar # ntpd # ntpd_enable="YES" # (default: "") so, most other services have an "enable" variable that I can put...
  20. K

    Solved rc.d scripting assistance for u2eve

    Hi, I am using ids-tools to convert read unified2 log files from security/snort and output events as JSON. I've written a rc.d script to start ids-tools at start-up but it doesn't appear to work. This is the rc.d script I've drafted. I am terrible at shell scripting. Could someone help me...
Top