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

    Custom startup scripts do not work reliable?

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 2.0k 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.
    • E
      eweri
      last edited by

      Hello!

      I want to run some startup scripts but I can not get it to work.

      1. I just tried the simple one - put my shell script into /usr/local/etc/rc.d/myscript.sh but it does not start.

      2. I tried to write a little script that starts my own script - now I get more and more processes of this script over time (currently I have a pfsense running at customer site that has 6 of my script running after 9 days of uptime :-()

      Is there any docs how the scripts in /usr/local/etc/rc.d/* has to be written to work?

      3. I tried to add a cron jobs that runs my script every 30 minutes this time it worked but I want to run this script not at every half an hour - I and want to run it after reboot every 30 minutes. So it should run at boottime+n*30minutes and not at *:00 and *:30.

      I found something about "shellcmd in config.xml" here at the forum but I can not find any more docs of this and how to run it.

      Every hint is welcome,
      eweri

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

        1. Add your script to /usr/local/etc/rc.d/
        2. The script must end in .sh
        3. chmod a+rx /usr/local/etc/rc.d/scriptname.sh

        1 Reply Last reply Reply Quote 0
        • E
          eweri
          last edited by

          @sullrich:

          1. Add your script to /usr/local/etc/rc.d/
          2. The script must end in .sh
          3. chmod a+rx /usr/local/etc/rc.d/scriptname.sh

          This is what I have done - and it does not work - but my script runs in an endless loop - maybe this is the problem?

          Bye,
          eweri

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.