Navigation

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

    Shellcmd (daemon) Blocking other Services

    2.4 Development Snapshots
    2
    6
    778
    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.
    • arrmo
      arrmo last edited by

      Hi,

      I admit, struggling to understand this one. I have a service (rc) file - works fine, details of the file as below,

      . /etc/rc.subr
      
      name=rateRRD
      rcvar="${name}_enable"
      load_rc_config $name
      
      command="/usr/sbin/daemon"
      command_args="-P /var/run/${name}.pid -r -t ${name} /usr/local/bin/${name}.py"
      pidfile="/var/run/${name}.pid"
      start_precmd="info Starting service ..."
      stop_postcmd="info Service has exited."
      
      run_rc_command "$1"
      

      By "works fine" I mean that if I run this from the shell (or ssh) it can be started, stopped, etc. But, if I try to run it from a shellcmd, it does start, but it blocks (some) other services from starting … which doesn't make any sense to me, as daemon should spawn this off (it does), so it should not be blocking (even if the .py file keeps running).

      Any thoughts?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • T
        TauCeti last edited by

        This is just a shot in the dark idea: have you tried appending "&" ?

        1 Reply Last reply Reply Quote 0
        • arrmo
          arrmo last edited by

          Hi,

          I haven't for this command - as it runs daemon, automatically goes to the bg, no?

          But I did try some other commands, and put them in the bg - no joy … :(.

          Thanks!

          1 Reply Last reply Reply Quote 0
          • T
            TauCeti last edited by

            I haven't for this command - as it runs daemon, automatically goes to the bg, no?

            Yeah I was thinking along the lines of: the sort of thing that shouldn't make a difference, but if you're getting desperate might be worth a try. And on the slim chance of it working, it would be a very interesting result.

            Good luck!

            1 Reply Last reply Reply Quote 0
            • arrmo
              arrmo last edited by

              Appreciate the suggestion though - thanks!

              1 Reply Last reply Reply Quote 0
              • arrmo
                arrmo last edited by

                OK, this is really odd … if I run this command as a shellcmd,

                service rateRRD start
                

                => it blocks the startup of other services. But, if I create a file inside /usr/local/etc/rc.d, named rateRRD.sh, and in that file …

                #!/bin/sh
                service rateRRD start
                
                

                This works perfectly! No blocking of other services or anything. So something not quite working right with shellcmd?

                Thanks!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post