• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Starting daemons without writing a package

Scheduled Pinned Locked Moved pfSense Packages
7 Posts 5 Posters 31.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    molar
    last edited by Dec 10, 2006, 12:08 AM

    Hello

    I've searched google, newsgroups, the mailing lists and these fine forums but have found no mention of any way to start freebsd daemons at bootup without writing a package?

    Is there a way to hack a service to startup without writing a full blown package and front end for webConfigurator?

    I.e. the equivalent of servicename_enable="YES" in rc.conf.

    Thanks. :)

    1 Reply Last reply Reply Quote 0
    • H
      hoba
      last edited by Dec 10, 2006, 12:19 AM

      http://faq.pfsense.com/index.php?action=artikel&cat=10&id=38&artlang=en&highlight=hidden (search for the shellcommand items).

      1 Reply Last reply Reply Quote 0
      • R
        rsw686
        last edited by Dec 10, 2006, 12:58 AM

        You could just make an rc file and stick it in /usr/local/etc/rc.d/ follow the format for an existing one.

        1 Reply Last reply Reply Quote 0
        • M
          molar
          last edited by Dec 10, 2006, 11:40 AM

          Thanks to you both. I will let you know how I get on.

          1 Reply Last reply Reply Quote 0
          • J
            Justinw
            last edited by Dec 11, 2006, 7:45 PM

            If you installed additional services using the pkg_add command, it usually generates its own rc.d file in /usr/local/etc/rc.d Just vi the file and change the enable:NO to YES and rename it to a shell script (.sh extension).  That is how I have been doing it anyways, I'm guessing someone is about to tell me that its a bad idea for one reason or another though…

            1 Reply Last reply Reply Quote 0
            • S
              sullrich
              last edited by Dec 11, 2006, 8:41 PM

              @Justinw:

              If you installed additional services using the pkg_add command, it usually generates its own rc.d file in /usr/local/etc/rc.d Just vi the file and change the enable:NO to YES and rename it to a shell script (.sh extension).  That is how I have been doing it anyways, I'm guessing someone is about to tell me that its a bad idea for one reason or another though…

              Bad idea.  JUST KIDDING.  This is absolutely fine what you are doing.  This is the correct way to start "extra" programs in pfSense.  Either this method or use <shellcmd>which you can place within <system>in config.xml.

              Example:

              <system><shellcmd>tcpdump -i xl0 &
              …
              ...

              Notice &.  You need to encode special characters since this is in a XML space.

              The advantage to config.xml mod is that your change gets backed up and restored meaning you do not need to recreate the rc.d file if you want to reinstall.</shellcmd></system></system></shellcmd>

              1 Reply Last reply Reply Quote 0
              • M
                molar
                last edited by Dec 13, 2006, 12:10 PM

                I've done it now thanks ;D

                I changed the enable:NO to YES in the shell script so that it always starts up by default.

                Thanks for the XML explanation as well.

                1 Reply Last reply Reply Quote 0
                2 out of 7
                • First post
                  2/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received